Interface ContextAware


@Deprecated public 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 Type
    Method
    Description
    Deprecated.
    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

      WebDriver context(String name)
      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 by getContextHandles().
      Returns:
      This driver focused on the given window.
      Throws:
      NoSuchContextException - If the context cannot be found.
    • getContextHandles

      Set<String> 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.