Package org.openqa.selenium
Interface ContextAware
Deprecated.
Some implementations of WebDriver, notably those that support native testing, need the ability to
switch between the native and web-based contexts. This can be achieved by using this interface.
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Switch the focus of future commands for this driver to the context with the given name.Deprecated.Return an opaque handle to this context that uniquely identifies it within this driver instance.Deprecated.Return a set of context handles which can be used to iterate over all contexts of this WebDriver instance.
-
Method Details
-
context
Deprecated.Switch the focus of future commands for this driver to the context with the given name.- Parameters:
name
- The name of the context as returned bygetContextHandles()
.- Returns:
- This driver focused on the given window.
- Throws:
NoSuchContextException
- If the context cannot be found.
-
getContextHandles
Deprecated.Return a set of context handles which can be used to iterate over all contexts of this WebDriver instance.- Returns:
- A set of context handles which can be used to iterate over available contexts.
-
getContext
String getContext()Deprecated.Return an opaque handle to this context that uniquely identifies it within this driver instance. This can be used to switch to this context at a later date.- Returns:
- The current context handle.
-