Provides functionality to interact with web applications.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
acceptNextDialog(
) → Future< String> - Accepts the next dialog that appears.
-
addCookie(
{required String name, required String value, String? url, String? domain, String? path, int? expires, bool? httpOnly, bool? secure, String? sameSite}) → Future< void> - Adds a cookie.
-
clearCookies(
) → Future< void> - Clears all cookies.
-
clearPermissions(
) → Future< void> - Clears all browser permissions.
-
closePage(
{required String pageId}) → Future< void> -
Closes the page with the given
pageId. -
configure(
) → Future< void> - Configures the web automator.
-
disableDarkMode(
) → Future< void> - Disables dark mode.
-
dismissNextDialog(
) → Future< String> - Dismisses the next dialog that appears.
-
enableDarkMode(
) → Future< void> - Enables dark mode.
-
enterText(
WebSelector selector, {required String text, WebSelector? iframeSelector}) → Future< void> -
Enters text to the web element specified by
selector. -
getClipboard(
) → Future< String> - Gets the clipboard content.
-
getCookies(
) → Future< List< LinkedHashMap< >Object?, Object?> > - Gets all cookies.
-
getCurrentPage(
) → Future< String> - Returns the ID of the currently active page.
-
getCurrentPageUrl(
) → Future< String> - Returns the URL of the currently active page.
-
getNativeViews(
) → Future< WebGetNativeViewsResponse> - Returns the DOM of the page under test, for the Patrol DevTools extension's inspector. Not a test step -- it isn't logged as one.
-
getPages(
) → Future< List< String> > - Returns identifiers of all open pages.
-
goBack(
) → Future< void> - Goes back in the browser history.
-
goForward(
) → Future< void> - Goes forward in the browser history.
-
grantPermissions(
{required List< String> permissions}) → Future<void> -
Grants the specified browser
permissions. -
initialize(
) → Future< void> - Initializes the web automator.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openNewPage(
{required String url}) → Future< String> -
Opens a new browser page navigating to
url. Returns the stable page ID of the new page. -
pressKey(
{required String key}) → Future< void> - Presses a keyboard key.
-
pressKeyCombo(
{required List< String> keys}) → Future<void> - Presses a keyboard key combination.
-
resizeWindow(
{required Size size}) → Future< void> - Resizes the browser window.
-
scrollTo(
WebSelector selector, {WebSelector? iframeSelector}) → Future< void> -
Scrolls to the web element specified by
selector. -
setClipboard(
{required String text}) → Future< void> - Sets the clipboard content.
-
switchToInitialPage(
) → Future< void> - Switches back to the initial page.
-
switchToPage(
{required String pageId}) → Future< void> -
Switches the active page to
pageId. All subsequent actions will target this page until switched again. -
takeNativeScreenshot(
String tag) → Future< void> - Captures a screenshot of the active page via Playwright.
-
tap(
WebSelector selector, {WebSelector? iframeSelector}) → Future< void> -
Taps on the web element specified by
selector. -
toString(
) → String -
A string representation of this object.
inherited
-
uploadFile(
{required List< UploadFileData> files}) → Future<void> - Uploads files.
-
verifyFileDownloads(
) → Future< List< String> > - Returns a list of all files downloaded during the single test.
-
waitForPopup(
) → Future< String> - Waits for a popup/new page to open. Returns the page ID of the newly opened page.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited