Class SHAFT.GUI.Playwright

java.lang.Object
com.shaft.driver.SHAFT.GUI.Playwright
All Implemented Interfaces:
SHAFT.GUI.Driver, DriverContract
Enclosing class:
SHAFT.GUI

public static class SHAFT.GUI.Playwright extends Object implements SHAFT.GUI.Driver
Manages a Microsoft Playwright browser session and exposes SHAFT GUI browser actions, element actions, alert helpers, and assertions.
  • Constructor Details

    • Playwright

      public Playwright()
    • Playwright

      public Playwright(com.microsoft.playwright.Page page)
    • Playwright

      public Playwright(com.microsoft.playwright.Playwright playwright, com.microsoft.playwright.Browser browser, com.microsoft.playwright.BrowserContext browserContext, com.microsoft.playwright.Page page)
  • Method Details

    • quit

      public void quit()
      Description copied from interface: DriverContract
      Terminates the underlying driver session.
      Specified by:
      quit in interface DriverContract
    • element

      public ElementActions element()
      Description copied from interface: DriverContract
      Returns element-level actions and assertions.
      Specified by:
      element in interface DriverContract
      Returns:
      element actions facade
    • touch

      public TouchActions touch()
      Description copied from interface: DriverContract
      Returns touch-action helpers for mobile scenarios.
      Specified by:
      touch in interface DriverContract
      Returns:
      touch actions facade
    • browser

      public BrowserActions browser()
      Description copied from interface: DriverContract
      Returns browser-level actions and context helpers.
      Specified by:
      browser in interface DriverContract
      Returns:
      browser actions facade
    • act

      public SHAFT.GUI.Playwright act(String intent, Object... args)
      Description copied from interface: DriverContract
      Runs a natural-language action against the current context.
      Specified by:
      act in interface DriverContract
      Specified by:
      act in interface SHAFT.GUI.Driver
      Parameters:
      intent - action intent
      args - action arguments
      Returns:
      this driver for fluent chaining
    • alert

      public AlertActions alert()
      Description copied from interface: DriverContract
      Returns alert/prompt helpers.
      Specified by:
      alert in interface DriverContract
      Returns:
      alert actions facade
    • assertThat

      public PlaywrightDriverAssertions assertThat()
      Description copied from interface: DriverContract
      Returns hard-assertion builder methods scoped to this session.
      Specified by:
      assertThat in interface DriverContract
      Returns:
      driver assertions facade
    • verifyThat

      public PlaywrightDriverVerifications verifyThat()
      Description copied from interface: DriverContract
      Returns soft-verification builder methods scoped to this session.
      Specified by:
      verifyThat in interface DriverContract
      Returns:
      driver verifications facade
    • getDriver

      public com.microsoft.playwright.Page getDriver()
      Description copied from interface: DriverContract
      Returns the primary native automation object for the active backend.
      Specified by:
      getDriver in interface DriverContract
      Returns:
      the live backend driver object
    • getNativeDriver

      public com.microsoft.playwright.Page getNativeDriver()
      Description copied from interface: DriverContract
      Alias for DriverContract.getDriver() that reads naturally when callers handle the session through the generic GUI driver contract.
      Specified by:
      getNativeDriver in interface DriverContract
      Returns:
      the live backend driver object
    • getNativeContext

      public com.microsoft.playwright.BrowserContext getNativeContext()
      Description copied from interface: DriverContract
      Returns the native backend context object when the backend exposes one.
      Specified by:
      getNativeContext in interface DriverContract
      Returns:
      the active backend context
    • getPlaywright

      public com.microsoft.playwright.Playwright getPlaywright()