Interface DriverContract
- All Known Subinterfaces:
SHAFT.GUI.Driver
- All Known Implementing Classes:
SHAFT.GUI.Playwright, SHAFT.GUI.WebDriver
public interface DriverContract
Public contract for SHAFT GUI automation sessions.
-
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.Returns the primary native automation object for the active backend.default ObjectReturns the native backend context object when the backend exposes one.default ObjectAlias forgetDriver()that reads naturally when callers handle the session through the generic GUI driver contract.voidquit()Terminates the underlying driver session.touch()Returns touch-action helpers for mobile scenarios.Returns soft-verification builder methods scoped to this session.
-
Method Details
-
getDriver
Object getDriver()Returns the primary native automation object for the active backend.- Returns:
- the live backend driver object
-
getNativeDriver
Alias forgetDriver()that reads naturally when callers handle the session through the generic GUI driver contract.- Returns:
- the live backend driver object
-
getNativeContext
Returns the native backend context object when the backend exposes one.- Returns:
- the active backend context
-
browser
BrowserActionsContract browser()Returns browser-level actions and context helpers.- Returns:
- browser actions facade
-
element
ElementActionsContract element()Returns element-level actions and assertions.- Returns:
- element actions facade
-
touch
TouchActions touch()Returns touch-action helpers for mobile scenarios.- Returns:
- touch actions facade
-
alert
-
assertThat
DriverAssertions assertThat()Returns hard-assertion builder methods scoped to this session.- Returns:
- driver assertions facade
-
verifyThat
DriverVerifications verifyThat()Returns soft-verification builder methods scoped to this session.- Returns:
- driver verifications facade
-
act
Runs a natural-language action against the current context.- Parameters:
intent- action intentargs- action arguments- Returns:
- this driver for fluent chaining
-
quit
void quit()Terminates the underlying driver session.
-