Class Switch

java.lang.Object
net.serenitybdd.screenplay.actions.Switch

public class Switch
extends java.lang.Object
Switch to a different frame or window. This wraps the WebDriver.switchTo() methods as Screenplay interactions.
  • Constructor Details

    • Switch

      public Switch()
  • Method Details

    • toFrame

      public static Performable toFrame​(java.lang.Integer frameId)
    • toFrame

      public static Performable toFrame​(java.lang.String frameName)
    • toFrame

      public static Performable toFrame​(org.openqa.selenium.WebElement webElement)
    • toParentFrame

      public static Performable toParentFrame()
    • toWindow

      public static Performable toWindow​(java.lang.String nameOrHandle)
    • toNewWindow

      public static Performable toNewWindow()
    • toWindowTitled

      public static Performable toWindowTitled​(java.lang.String title)
    • toTheOtherWindow

      public static Performable toTheOtherWindow()
      Switch to the first window that is not the current window.
      Returns:
    • toAlert

      public static Performable toAlert()
    • toDefaultContext

      public static Performable toDefaultContext()
    • toActiveElement

      public static Performable toActiveElement()