java.lang.Object
net.serenitybdd.screenplay.playwright.interactions.SwitchTo

public class SwitchTo extends Object
Switch between browser pages (tabs) or open new ones.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.serenitybdd.screenplay.Performable
    Open a new browser page (tab).
    static net.serenitybdd.screenplay.Performable
    Open a new page and navigate to the given URL.
    static net.serenitybdd.screenplay.Performable
    pageNumber(int index)
    Switch to the page at the given index (0-based).
    static net.serenitybdd.screenplay.Performable
    Switch to the page with the given title (partial match).
    static net.serenitybdd.screenplay.Performable
    Switch to the page with the given URL (partial match).
    static net.serenitybdd.screenplay.Performable
    Close the current page and switch to the previous one.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SwitchTo

      public SwitchTo()
  • Method Details

    • newPage

      public static net.serenitybdd.screenplay.Performable newPage()
      Open a new browser page (tab).
    • newPageAt

      public static net.serenitybdd.screenplay.Performable newPageAt(String url)
      Open a new page and navigate to the given URL.
    • pageNumber

      public static net.serenitybdd.screenplay.Performable pageNumber(int index)
      Switch to the page at the given index (0-based).
    • pageWithTitle

      public static net.serenitybdd.screenplay.Performable pageWithTitle(String title)
      Switch to the page with the given title (partial match).
    • pageWithUrl

      public static net.serenitybdd.screenplay.Performable pageWithUrl(String url)
      Switch to the page with the given URL (partial match).
    • previousPageAfterClosingCurrent

      public static net.serenitybdd.screenplay.Performable previousPageAfterClosingCurrent()
      Close the current page and switch to the previous one.