Class SHAFT.GUI.Playwright
java.lang.Object
com.shaft.driver.SHAFT.GUI.Playwright
- All Implemented Interfaces:
SHAFT.GUI.Driver, DriverContract
- Enclosing class:
SHAFT.GUI
Manages a Microsoft Playwright browser session and exposes SHAFT GUI
browser actions, element actions, alert helpers, and assertions.
-
Constructor Summary
ConstructorsConstructorDescriptionPlaywright(com.microsoft.playwright.Page page) Playwright(com.microsoft.playwright.Playwright playwright, com.microsoft.playwright.Browser browser, com.microsoft.playwright.BrowserContext browserContext, com.microsoft.playwright.Page page) -
Method Summary
Modifier and TypeMethodDescriptionRuns a natural-language action against the current context.alert()Returns alert/prompt helpers.Returns hard-assertion builder methods scoped to this session.browser()Returns browser-level actions and context helpers.element()Returns element-level actions and assertions.com.microsoft.playwright.PageReturns the primary native automation object for the active backend.com.microsoft.playwright.BrowserContextReturns the native backend context object when the backend exposes one.com.microsoft.playwright.PageAlias forDriverContract.getDriver()that reads naturally when callers handle the session through the generic GUI driver contract.com.microsoft.playwright.Playwrightvoidquit()Terminates the underlying driver session.touch()Returns touch-action helpers for mobile scenarios.Returns soft-verification builder methods scoped to this session.
-
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:DriverContractTerminates the underlying driver session.- Specified by:
quitin interfaceDriverContract
-
element
Description copied from interface:DriverContractReturns element-level actions and assertions.- Specified by:
elementin interfaceDriverContract- Returns:
- element actions facade
-
touch
Description copied from interface:DriverContractReturns touch-action helpers for mobile scenarios.- Specified by:
touchin interfaceDriverContract- Returns:
- touch actions facade
-
browser
Description copied from interface:DriverContractReturns browser-level actions and context helpers.- Specified by:
browserin interfaceDriverContract- Returns:
- browser actions facade
-
act
Description copied from interface:DriverContractRuns a natural-language action against the current context.- Specified by:
actin interfaceDriverContract- Specified by:
actin interfaceSHAFT.GUI.Driver- Parameters:
intent- action intentargs- action arguments- Returns:
- this driver for fluent chaining
-
alert
Description copied from interface:DriverContractReturns alert/prompt helpers.- Specified by:
alertin interfaceDriverContract- Returns:
- alert actions facade
-
assertThat
Description copied from interface:DriverContractReturns hard-assertion builder methods scoped to this session.- Specified by:
assertThatin interfaceDriverContract- Returns:
- driver assertions facade
-
verifyThat
Description copied from interface:DriverContractReturns soft-verification builder methods scoped to this session.- Specified by:
verifyThatin interfaceDriverContract- Returns:
- driver verifications facade
-
getDriver
public com.microsoft.playwright.Page getDriver()Description copied from interface:DriverContractReturns the primary native automation object for the active backend.- Specified by:
getDriverin interfaceDriverContract- Returns:
- the live backend driver object
-
getNativeDriver
public com.microsoft.playwright.Page getNativeDriver()Description copied from interface:DriverContractAlias forDriverContract.getDriver()that reads naturally when callers handle the session through the generic GUI driver contract.- Specified by:
getNativeDriverin interfaceDriverContract- Returns:
- the live backend driver object
-
getNativeContext
public com.microsoft.playwright.BrowserContext getNativeContext()Description copied from interface:DriverContractReturns the native backend context object when the backend exposes one.- Specified by:
getNativeContextin interfaceDriverContract- Returns:
- the active backend context
-
getPlaywright
public com.microsoft.playwright.Playwright getPlaywright()
-