RPA.Browser.Playwright
Adds a cookie to currently active browser context.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
name | str | null | |
value | str | null | |
url | str, None | None | |
domain | str, None | None | |
path | str, None | None | |
expires | str, None | None | |
httpOnly | bool, None | None | |
secure | bool, None | None | |
sameSite | CookieSameSite, None | None |
Arguments | Description |
---|---|
name | Name of the cookie. |
value | Given value for the cookie. |
url | Given url for the cookie. Defaults to None. Either url or domain / path pair must be set. |
domain | Given domain for the cookie. Defaults to None. Either url or domain / path pair must be set. |
path | Given path for the cookie. Defaults to None. Either url or domain / path pair must be set. |
expires | Given expiry for the cookie. Can be of date format or unix time. Supports the same formats as the DateTime library or an epoch timestamp. - example: 2027-09-28 16:21:35 |
httpOnly | Sets the httpOnly token. |
secure | Sets the secure token. |
samesite | Sets the samesite mode. |
Examples
Checks the checkbox or selects radio button found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
force | bool | False |
Arguments | Description | |
---|---|---|
selector | Selector of the checkbox. See the Finding elements section for details about the selectors. | |
force | Set to True to skip Playwright's [https://playwright.dev/docs/actionability | Actionability checks]. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Does nothing if the element is already checked/selected.
Clears all permissions from the current context.
Clears the text field found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null |
Arguments | Description |
---|---|
selector | Selector of the text field. See the Finding elements section for details about the selectors. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
See Type Text for emulating typing text character by character. See Fill Text for direct filling of the full text at once.
Simulates mouse click on the element found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
button | MouseButton | left | |
clickCount | Deprecated | ||
delay | Deprecated | ||
position_x | Deprecated | ||
position_y | Deprecated | ||
force | Deprecated | ||
noWaitAfter | Deprecated | ||
modifiers | Deprecated | null |
This keyword clicks an element matching selector
by performing the following steps:
- Find an element matches selector. If there is none, wait until a matching element is attached to the DOM.
- Wait for actionability checks on the matched element, unless
force
option is set. If the element is detached during the checks, the whole action is retried. - Scroll the element into view if needed.
- Use Mouse Button to click in the center of the element, or the specified position.
- Wait for initiated navigation to either succeed or fail, unless
noWaitAfter
option is set.
Arguments | Description |
---|---|
selector | Selector element to click. See the Finding elements section for details about the selectors. |
button | Defaults to left if invalid. |
! The arguments marked as Deprecated
will be removed in the future, but the Click keyword will still be available! The reason for removing these arguments is the bad design of modifiers, which forces the user to set all other arguments as positional arguments when modifiers are used, and the missing extensibility of the keyword. Please use Click With Options when using arguments that are marked as deprecated.
Keyword uses strict mode, see Finding elements for more details about strict mode.
Examples
Simulates mouse click on the element found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
button | MouseButton | left | |
modifiers | KeyboardModifier | null | |
clickCount | int | 1 | |
delay | timedelta, None | None | |
force | bool | False | |
noWaitAfter | bool | False | |
position_x | float, None | None | |
position_y | float, None | None | |
trial | bool | False |
This keyword clicks an element matching selector
by performing the following steps:
- Find an element matches selector. If there is none, wait until a matching element is attached to the DOM.
- Wait for actionability checks on the matched element, unless
force
option is set. If the element is detached during the checks, the whole action is retried. - Scroll the element into view if needed.
- Use Mouse Button to click in the center of the element, or the specified position.
- Wait for initiated navigation to either succeed or fail, unless
noWaitAfter
option is set.
Arguments | Description |
---|---|
selector | Selector element to click. See the Finding elements section for details about the selectors. |
button | Defaults to left if invalid. |
*modifiers | Modifier keys to press. Ensures that only these modifiers are pressed during the click, and then restores current modifiers back. If not specified, currently pressed modifiers are used. Modifiers can be specified in any order, and multiple modifiers can be specified. Valid modifier keys are Control , Alt , Shift and Meta . Due to the fact that the argument *modifiers is a positional only argument, all preceding keyword arguments have to be specified as positional arguments before *modifiers. |
clickCount | Defaults to 1. |
delay | Time to wait between mouse-down and mouse-up. Defaults to 0. |
position_x position_y | A point to click relative to the top-left corner of element bounding-box. Only positive values within the bounding-box are allowed. If not specified, clicks to some visible point of the element. |
force | Set to True to skip Playwright's Actionability checks (https://playwright.dev/docs/actionability). |
noWaitAfter | Actions that initiate navigation, are waiting for these navigation to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to False . |
trial | When set, this method only performs the actionability checks and skips the action. Defaults to false. Useful to wait until the element is ready for the action without performing it. |
Arguments clickCount
, delay
, position_x
, position_y
, force
, noWaitAfter
and trial
are named-only arguments and must be specified using their names..
Keyword uses strict mode, see Finding elements for more details about strict mode.
Examples
Closes the current browser.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
browser | SelectionType, str | CURRENT |
Active browser is set to the browser that was active before this one. Closes all context and pages belonging to this browser. See Browser, Context and Page for more information about Browser and related concepts.
Argument | Description |
---|---|
browser | Browser to close. CURRENT selects the active browser. ALL closes all browsers. When a browser id is provided, that browser is closed. |
Examples
Closes a Context.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
context | SelectionType, str | CURRENT | |
browser | SelectionType, str | CURRENT |
Active context is set to the context that was active before this one. Closes pages belonging to this context. See Browser, Context and Page for more information about Context and related concepts.
Argument | Description |
---|---|
context | Context to close. CURRENT selects the active context. ALL closes all contexts. When a context id is provided, that context is closed. |
browser | Browser where to close context. CURRENT selects the active browser. ALL closes all browsers. When a browser id is provided, that browser is closed. |
Examples
Closes the page
in context
in browser
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
page | SelectionType, str | CURRENT | |
context | SelectionType, str | CURRENT | |
browser | SelectionType, str | CURRENT | |
runBeforeUnload | bool | False |
Defaults to current for all three. Active page is set to the page that was active before this one. See Browser, Context and Page for more information about Page and related concepts.
runBeforeUnload
defines where to run the before unload page handlers. Defaults to false.
Argument | Description |
---|---|
page | Page to close. CURRENT selects the active page. ALL closes all pages. When a page id is provided, that page is closed. |
context | Context where to close page. CURRENT selects the active context. ALL closes all contexts. When a context id is provided, that context is closed. |
browser | Browser where to close page. CURRENT selects the active browser. ALL closes all browsers. When a browser id is provided, that browser is closed. |
Returns a list of dictionaries containing id, errors and console messages from the page.
Example
Connect to a playwright Browser.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
wsEndpoint | str | null | |
browser | SupportedBrowsers | chromium |
See Browser, Context and Page for more information about Browser and related concepts.
Returns a stable identifier for the connected browser.
Argument | Description |
---|---|
wsEndpoint | Address to connect to. |
browser | Opens the specified browser. Defaults to chromium . |
Web crawler is a tool to go through all the pages on a specific URL domain. This happens by finding all links going to the same site and opening those.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
url | str, None | None | |
page_crawl_keyword | take_screenshot | ||
max_number_of_page_to_crawl | int | 1000 | |
max_depth_to_crawl | int | 50 |
returns list of crawled urls.
Arguments | Description |
---|---|
url | is the page to start crawling from. |
page_crawl_keyword | is the keyword that will be executed on every page. By default it will take a screenshot on every page. |
max_number_of_page_to_crawl | is the upper limit of pages to crawl. Crawling will stop if the number of crawled pages goes over this. |
max_depth_to_crawl | is the upper limit of consecutive links followed from the start page. Crawling will stop if there are no more links under this depth. |
Deletes all cookies from the currently active browser context.
Deselects all options from select element found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null |
Arguments | Description |
---|---|
selector | Selector of the select tag. See the Finding elements section for details about the selectors. |
If you just want to select one or more specific options and currently more options are selected, use Select Options By keyword with the options to be selected in the end.
Keyword uses strict mode, see Finding elements for more details about strict mode.
Download given url content.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
url | str | null |
Keyword returns dictionary which contains downloaded file path and suggested filename as keys (saveAs and suggestedFilename). If the file URL cannot be found (the download is triggered by event handlers) use Wait For Downloadkeyword.
To enable downloads context's acceptDownloads
needs to be true.
To configure download directory use New Browser's downloadsPath
settings
With default filepath downloaded files are deleted when Context the download happened in is closed.
This keyword requires that there is currently an open page. The keyword uses the current pages local state (cookies, sessionstorage, localstorage) for the download to avoid authentication problems.
Examples
Example 2:
Executes a Drag&Drop operation from the element selected by selector_from
to the element selected by selector_to
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector_from | str | null | |
selector_to | str | null | |
steps | int | 1 |
Arguments | Description |
---|---|
selector_from | Identifies the element, which center is the start-point. |
selector_to | Identifies the element, which center is the end-point. |
steps | Defines how many intermediate mouse move events are sent. Often it is nessesary to send more than one intermediate event to get the desired result. Defaults to 1. |
See the Finding elements section for details about the selectors.
First it moves the mouse to the start-point, then presses the left mouse button, then moves to the end-point in specified number of steps, then releases the mouse button.
Start- and end-point are defined by the center of the elements boundingbox.
Keyword uses strict mode, see Finding elements for more details about strict mode.
Example
Executes a Drag&Drop operation from a coordinate to another coordinate.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
from_x | float | null | |
from_y | float | null | |
to_x | float | null | |
to_y | float | null | |
steps | int | 1 |
First it moves the mouse to the start-point, then presses the left mouse button, then moves to the end-point in specified number of steps, then releases the mouse button.
Start- and end-point are defined by x
and y
coordinates relative to the top left corner of the pages viewport.
from_x & from_y | Identify the start-point on page. |
to_x & to_y | Identify the end-point. |
steps | Defines how many intermediate mouse move events are sent. Often it is nessesary to send more than one intermediate event to get the desired result. Defaults to 1. |
Examples
Executes a Drag&Drop operation from the element selected by selector_from
to coordinates relative to the center of that element.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector_from | str | null | |
x | float | 0.0 | |
y | float | 0.0 | |
steps | int | 1 |
This keyword can be handy to simulate swipe actions.
Arguments | Description |
---|---|
selector_from | identifies the element, which center is the start-point. |
x & y | identifies the end-point which is relative to the start-point. |
steps | defines how many intermediate mouse move events are sent. Often it is nessesary to send more than one intermediate event to get the desired result. Defaults to 1. |
See the Finding elements section for details about the selectors.
First it moves the mouse to the start-point (center of boundingbox), then presses the left mouse button, then moves to the relative position with the given intermediate steps, then releases the mouse button.
Keyword uses strict mode, see Finding elements for more details about strict mode.
Example
Eat all cookies for all easter.
Executes given javascript on the selected element(s) or on page.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str, None | None | |
function | str | null | |
arg | Any, None | None | |
all_elements | bool | False |
Arguments | Description |
---|---|
selector | Selector to resolve and pass to the JavaScript function. This will be the first argument the function receives if not ${None} . selector is optional and can be omitted. If given a selector, a function is necessary, with an argument to capture the elementHandle. For example (element) => document.activeElement === element See the Finding elements section for details about the selectors. |
*function | A valid javascript function or a javascript function body. These arguments can be used to write readable multiline JavaScript. |
arg | an additional argument that can be handed over to the JavaScript function. This argument must be JSON serializable. ElementHandles are not supported. |
all_elements | defines if only the single elementHandle found by selector is handed over to the function or if set to True all found elements are handed over as array. |
Example with all_elements=True
:
Keyword uses strict mode if all_elements
is False
. See Finding elements for more details about strict mode.
Fills the given secret from variable_name
into the text field found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
secret | str | null | |
force | bool | False |
Arguments | Description | |
---|---|---|
secret | The secret string that should be filled into the text field. | |
selector | Selector of the text field. See the Finding elements section for details about the selectors. | |
force | Set to True to skip Playwright's [https://playwright.dev/docs/actionability | Actionability checks]. |
This keyword does not log secret in Robot Framework logs, when keyword resolves the secret
variable internally. When secret
variable is prefixed with $, without the curly braces, library will resolve the corresponding Robot Framework variable.
If secret
variable is prefixed with %, library will resolve corresponding environment variable. Example $Password` will resolve to ${Password}
Robot Framework variable. Also %ENV_PWD
will resolve to %{ENV_PWD}
environment variable.
Using normal Robot Framework variables like ${password}
will not work!
Normal plain text will not work. If you want to use plain text, use Fill Text keyword instead.
This keyword will also work with a give cryptographic cipher text, that has been encrypted by Crypto library. See Crypto Library for more details.
If enable_playwright_debug
is enabled in the library import, secret will be always visible as plain text in the playwright debug logs, regardless of the Robot Framework log level.
Keyword uses strict mode, see Finding elements for more details about strict mode.
See Fill Text for other details.
Examples
Clears and fills the given txt
into the text field found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
txt | str | null | |
force | bool | False |
This method waits for an element matching the selector
to appear, waits for actionability checks, focuses the element, fills it and triggers an input event after filling.
If the element matching selector is not an <input>, <textarea> or [contenteditable] element, this method throws an error. Note that you can pass an empty string as txt
to clear the input field.
Arguments | Description | |
---|---|---|
selector | Selector of the text field. See the Finding elements section for details about the selectors. | |
txt | Text for the text field. | |
force | Set to True to skip Playwright's [https://playwright.dev/docs/actionability | Actionability checks]. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
See Type Text for emulating typing text character by character.
Examples
Moves focus on to the element found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null |
Arguments | Description |
---|---|
selector | Selector of the element. See the Finding elements section for details about the selectors. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
If there's no element matching selector, the method waits until a matching element appears in the DOM. Timeouts after 10 seconds.
Returns the HTML attribute
of the element found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
attribute | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
Arguments | Description |
---|---|
selector | Selector from which the info is to be retrieved. See the Finding elements section for details about the selectors. |
attribute | Requested attribute name. |
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the state |
message | overrides the default error message for assertion. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Optionally asserts that the attribute value matches the expected value. See Assertions for further details for the assertion arguments. By default assertion is not done.
When a attribute is selected that is not present and no assertion operator is set, the keyword fails. If an assertion operator is set and the attribute is not present, the returned value is None
. This can be used to assert check the presents or the absents of an attribute.
Example Element:
Example Code:
Returns all HTML attribute names of an element as a list.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | null | ||
message | str, None | None |
Arguments | Description |
---|---|
selector | Selector from which the info is to be retrieved. See the Finding elements section for details about the selectors. |
assertion_operator | See Assertions for further details. Defaults to None. |
*assertion_expected | Expected value for the state |
message | overrides the default error message for assertion. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Optionally asserts that attribute names do match to the expected value. See Assertions for further details for the assertion arguments. By default assertion is not done.
Available assertions:
==
,!=
andcontains
/*=
can work with multiple valuesvalidate
andevaluate
only accepts one single expected value
Other operators are not allowed.
Examples
Gets elements size and location as an object {x: float, y: float, width: float, height: float}
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
key | BoundingBoxFields | ALL | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
Arguments | Description |
---|---|
selector | Selector from which shall be retrieved. See the Finding elements section for details about the selectors. |
key | Optionally filters the returned values. If keys is set to ALL (default) it will return the BoundingBox as Dictionary, otherwise it will just return the single value selected by the key. Note: If a single value is retrieved, an assertion does not need a validate combined with a cast of value . |
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the counting |
message | overrides the default error message for assertion. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Optionally asserts that the value matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
Example use:
Returns all browsers, open contexts in them and open pages in these contexts.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
See Browser, Context and Page for more information about these concepts.
Arguments | Description |
---|---|
assertion_operator | Optional assertion operator. See Assertions for more information. |
assertion_expected | Optional expected value. See Assertions for more information. |
message | Optional custom message to use on failure. See Assertions for more information. |
The data is parsed into a python list containing data representing the open Objects.
On the root level the data contains a list of open browsers.
Data can be manipulated also with assertion_operator
for example to find a specific id based on index or page title with then
operator.
Return value can also be asserted against expected value.
Sample:
Returns a list of ids from open browsers. See Browser, Context and Page for more information about Browser and related concepts.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
browser | SelectionType | ALL |
browser
Defaults to ALL
ALL
/ANY
Returns all ids as a list.ACTIVE
/CURRENT
Returns the id of the currently active browser as list.
Arguments | Description |
---|---|
browser | The browser to get the ids from. ALL for all open browsers, ACTIVE for the currently active browser or the id of the browser to get the ids from. |
The ACTIVE browser is a synonym for the CURRENT Browser.
Returns the state of the checkbox found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | bool, str | Unchecked | |
message | str, None | None |
Optionally asserts that the state matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
Arguments | Description |
---|---|
selector | Selector which shall be examined. See the Finding elements section for details about the selectors. |
assertion_operator | == and != and equivalent are allowed on boolean values. Other operators are not accepted. |
assertion_expected | Boolean value of expected state. Strings are interpreted as booleans. All strings are ${True} except of the following FALSE, NO, OFF, 0, UNCHECKED, NONE, ${EMPTY}` (case-insensitive). Defaults to unchecked. |
message | overrides the default error message for assertion. |
checked
=>True
unchecked
=>False
Keyword uses strict mode, see Finding elements for more details about strict mode.
Examples
Returns all classes of an element as a list.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | null | ||
message | str, None | None |
Arguments | Description |
---|---|
selector | Selector from which the info is to be retrieved. See the Finding elements section for details about the selectors. |
assertion_operator | See Assertions for further details. Defaults to None. |
*assertion_expected | Expected values for the state |
message | overrides the default error message for assertion. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Optionally asserts that the value matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
Available assertions:
==
,!=
andcontains
/*=
can work with multiple valuesvalidate
andevaluate
only accepts one single expected value
Other operators are not allowed.
Examples
Gets elements or pages client size (clientHeight
, clientWidth
) as object {width: float, height: float}.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str, None | None | |
key | SizeFields | ALL | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
Arguments | Description |
---|---|
selector | Optional selector from which shall be retrieved. If no selector is given the client size of the page itself is used (document.scrollingElement ). See the Finding elements section for details about the selectors. |
key | Optionally filters the returned values. If keys is set to ALL (default) it will return the scroll size as dictionary, otherwise it will just return the single value selected by the key. |
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the counting |
message | overrides the default error message for assertion. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Optionally asserts that the value matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
See Get BoundingBox or Get Scroll Size for examples.
Returns the console log of the active page.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None | |
null | |||
full | bool | False | |
last | int, timedelta, None | None |
If assertions are used and fail, this keyword will fail immediately without retrying.
Arguments | Description |
---|---|
assertion_operator | Optional assertion operator. See Assertions for more information. |
assertion_expected | Optional expected value. See Assertions for more information. |
message | Optional custom message to use on failure. See Assertions for more information. |
full | If true, returns the full console log. If false, returns only new entries that were added since last time. |
last | If set, returns only the last n entries. Can be int for number of entries or timedelta for time period. |
The returned data is a list of log messages.
A log message is a dict with the following structure:
Examples
Keys:
Key | Description |
---|---|
type | One of the following values: log , debug , info , error , warning , dir , dirxml , table , trace , clear , startGroup , startGroupCollapsed , endGroup , assert , profile , profileEnd , count , timeEnd |
text | The text of the console message. |
location.url | The URL of the resource that generated this message. |
location.lineNumber | The line number in the resource that generated this message (0-based). |
location.columnNumber | The column number in the resource that generated this message (0-based). |
time | The timestamp of the log message as ISO 8601 string. |
Returns a list of context ids based on the browser selection. See Browser, Context and Page for more information about Context and related concepts.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
context | SelectionType | ALL | |
browser | SelectionType | ALL |
ALL
and ANY
are synonyms. ACTIVE
and CURRENT
are also synonyms.
Arguments | Description |
---|---|
context | The context to get the ids from. ALL will return all ids from selected browser(s), ACTIVE for the one active context of each selected browser. |
browser | The browser to get the context ids from. ALL Context ids from all open browsers shall be fetched. ACTIVE Only context ids from the active browser shall be fetched. |
The ACTIVE context of the ACTIVE Browser is the Current
Context.
Returns information of cookie with name
as a Robot Framework dot dictionary or a string.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
cookie | str | null | |
return_type | CookieType | dictionary |
Arguments | Description |
---|---|
cookie | Name of the cookie to be retrieved. |
return_type | Type of the return value. Can be either dictionary or string . Defaults to dictionary . |
If return_type
is dictionary
or dict
then keyword returns a of Robot Framework dot dictionary The dictionary contains all possible key value pairs of the cookie. If return_type
is string
or str
, then keyword returns the cookie as a string in format: name1=value1
. The return value contains only name
and value
keys of the cookie.
If no cookie is found with name
keyword fails. The cookie dictionary contains details about the cookie. Keys available in the dictionary are documented in the table below.
Value | Explanation |
name | The name of a cookie, mandatory. |
value | Value of the cookie, mandatory. |
url | Define the scope of the cookie, what URLs the cookies should be sent to. |
domain | Specifies which hosts are allowed to receive the cookie. |
path | Indicates a URL path that must exist in the requested URL, for example /. |
expiry | Lifetime of a cookie. Returned as datatime object or None if not valid time received. |
httpOnly | When true, the cookie is not accessible via JavaScript. |
secure | When true, the cookie is only used with HTTPS connections. |
sameSite | Attribute lets servers require that a cookie shouldn't be sent with cross-origin requests. |
See playwright documentation for details about each attribute.
Examples
Returns cookies from the current active browser context.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
return_type | CookieType | dictionary |
If return_type
is dictionary
or dict
then keyword returns list of Robot Framework dot dictionaries The dictionary contains all possible key value pairs of the cookie. See Get Cookie keyword documentation about the dictionary keys and values.
If return_type
is string
or str
, then keyword returns the cookie as a string in format: name1=value1; name2=value2; name3=value3
. The return value contains only name
and value
keys of the cookie.
Get a single device descriptor with name exactly matching name.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
name | str | null |
Arguments | Description |
---|---|
name | Given name of the requested device. See Playwright's deviceDescriptorsSource.json for a formatted list. |
Allows a concise syntax to set website testing values to exact matches of specific mobile devices.
Use by passing to a context. After creating a context with devicedescriptor, before using ensure your active page is on that context. Usage:
Returns a dict of all playwright device descriptors.
See Playwright's deviceDescriptorsSource.json for a formatted list.
Returns a reference to a Playwright Locator.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null |
The reference can be used in subsequent selectors.
Arguments | Description |
---|---|
selector | Selector from which shall be retrieved . See the Finding elements section for details about the selectors. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Examples
Allows locating elements by their features.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selection_strategy | SelectionStrategy | null | |
text | str, RegExp | null | |
exact | bool | False | |
all_elements | bool | False |
Selection strategies can be several Playwright strategies like AltText or Label. See Playwright Locators for more information.
Arguments | Description |
---|---|
locator_type | SelectionStrategy to be used. Refers to Playwrights page.getBy*** functions. See https://playwright.dev/docs/locators |
text | Text to locate the element for. |
exact | Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. This has no effect if RegExp is used or if TestID is used as strategy. |
all_elements | If True, returns all matched elements as a list. |
This keywords implements the following Playwright functions:
- page.getByAltText
- page.getByLabel
- page.getByPlaceholder
- page.getByTestId
- page.getByText
- page.getByTitle
page.getByRole
is supported by Get Element By Role keyword.
Returns a reference to Playwright Locator for the matched element by role
or a list of references if all_elements
is set to True
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
role | ElementRole | null | |
null | |||
all_elements | bool | False | |
checked | bool, None | None | |
disabled | bool, None | None | |
exact | bool, None | None | |
expanded | bool, None | None | |
include_hidden | bool, None | None | |
level | int, None | None | |
name | str, RegExp, None | None | |
pressed | bool, None | None | |
selected | bool, None | None |
Allows locating elements by their ARIA role, ARIA attributes and accessible name.
Consider the following DOM structure.
You can locate each element by it's implicit role:
Arguments | Description |
---|---|
all_elements | If True, returns all matched elements as a list. |
role | Role from which shall be retrieved. |
checked | An attribute that is usually set by aria-checked or native <input type=checkbox> controls. |
disabled | An attribute that is usually set by aria-disabled or disabled. |
exact | Whether name is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when name is a regular expression. Note that exact match still trims whitespace. |
expanded | An attribute that is usually set by aria-expanded. |
include_hidden | Option that controls whether hidden elements are matched. By default, only non-hidden elements, as defined by ARIA, are matched by role selector. |
level | A number attribute that is usually present for roles heading, list item, row, treeitem, with default values for <h1>-<h6> elements. |
name | Option to match the accessible name. By default, matching is case-insensitive and searches for a substring, use exact to control this behavior. |
pressed | An attribute that is usually set by aria-pressed. |
selected | An attribute that is usually set by aria-selected. |
Returns the count of elements found with selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | int, str | 0 | |
message | str, None | None |
Arguments | Description |
---|---|
selector | Selector which shall be counted. See the Finding elements section for details about the selectors. |
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the counting |
message | overrides the default error message for assertion. |
Optionally asserts that the state matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
Examples
Get the active states from the element found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | ElementState, str | null | |
message | str, None | None | |
return_names | True |
This Keyword returns a list of states that are valid for the selected element.
Arguments | Description |
---|---|
selector | Selector of the corresponding object. See the Finding elements section for details about the selectors. |
assertion_operator | See Assertions for further details. Defaults to None. |
*assertion_expected | Expected states |
message | overrides the default error message for assertion. |
return_names | If set to False the keyword does return an IntFlag object instead of a list. Defaults to True . |
Optionally asserts that the state matches the specified assertion. See Assertions for further details for the assertion arguments. By default, assertion is not done.
This keyword internally works with Python IntFlag. Flags can be processed using bitwise operators like & (bitwise AND) and | (bitwise OR). When using the assertion operators then
, evaluate
or validate
the value
contain the states as ElementState.
Examples
The most typical use case would be to verify if an element contains a specific state or multiple states.
Example:
Elements do return the positive and negative values if applicable. As example, a checkbox does return either checked
or unchecked
while a text input element has none of those two states. Select elements have also either selected
or unselected
.
The state of animating
will be set if an element is not considered stable
within 300 ms.
If an element is not attached to the dom, so it can not be found within 250ms it is marked as detached
as the only state.
stable
state is not returned, because it would cause too high delay in that keyword.
Keyword uses strict mode, see Finding elements for more details about strict mode.
Returns a reference to Playwright Locator for all matched elements by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null |
Arguments | Description |
---|---|
selector | Selector from which shall be retrieved. See the Finding elements section for details about the selectors. |
Examples
Returns the page errors of the active page.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None | |
null | |||
full | bool | False | |
last | int, timedelta, None | None |
If assertions are used and fail, this keyword will fail immediately without retrying.
Arguments | Description |
---|---|
assertion_operator | Optional assertion operator. See Assertions for more information. |
assertion_expected | Optional expected value. See Assertions for more information. |
message | Optional custom message to use on failure. See Assertions for more information. |
full | If true, returns the full console log. If false, returns only new entries that were added since last time. |
last | If set, returns only the last n entries. Can be int for number of entries or timedelta for time period. |
The returned data is a list of error messages.
An error message is a dict with the following structure:
Examples
Keys:
Key | Description |
---|---|
name | The name/type of the error. |
message | The human readable error message. |
stack | The stack trace of the error, if given. |
time | The timestamp of the error as ISO 8601 string. |
Returns a list of page ids based on the context and browser selection. See Browser, Context and Page for more information about Page and related concepts.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
page | SelectionType | ALL | |
context | SelectionType | ALL | |
browser | SelectionType | ALL |
ALL
and ANY
are synonyms. ACTIVE
and CURRENT
are also synonyms.
Arguments | Description |
---|---|
page | The page to get the ids from. ALL Returns all page ids as a list. ACTIVE Returns the id of the active page as a list. |
context | The context to get the page ids from. ALL Page ids from all contexts shall be fetched. ACTIVE Only page ids from the active context shall be fetched. |
browser | The browser to get the page ids from. ALL Page ids from all open browsers shall be fetched. ACTIVE Only page ids from the active browser shall be fetched. |
Examples
The ACTIVE page of the ACTIVE context of the ACTIVE Browser is the Current
Page.
Gets pages HTML source as a string.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
Arguments | Description |
---|---|
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the state |
message | overrides the default error message for assertion. |
Optionally does a string assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
Returns the property
of the element found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
property | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
Arguments | Description |
---|---|
selector | Selector from which the info is to be retrieved. See the Finding elements section for details about the selectors. |
property | Requested property name. |
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the state |
message | overrides the default error message for assertion. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Optionally asserts that the property value matches the expected value. See Assertions for further details for the assertion arguments. By default assertion is not done.
If assertion_operator
is set and property is not found, value
is None
and Keyword does not fail. See Get Attribute for examples.
Examples
Gets elements or pages current scroll position as object {top: float, left: float, bottom: float, right: float}
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str, None | None | |
key | AreaFields | ALL | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
It describes the rectangle which is visible of the scrollable content of that element. all values are measured from position {top: 0, left: 0}.
Arguments | Description |
---|---|
selector | Optional selector from which shall be retrieved. If no selector is given the client size of the page itself is used (document.scrollingElement ). See the Finding elements section for details about the selectors. |
key | Optionally filters the returned values. If keys is set to ALL (default) it will return the scroll position as dictionary, otherwise it will just return the single value selected by the key. |
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the counting |
message | overrides the default error message for assertion. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Optionally asserts that the value matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
See Get BoundingBox or Get Scroll Size for examples.
Gets elements or pages scrollable size as object {width: float, height: float}
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str, None | None | |
key | SizeFields | ALL | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
Arguments | Description |
---|---|
selector | Optional selector from which shall be retrieved. If no selector is given the scroll size of the page itself is used. See the Finding elements section for details about the selectors. |
key | Optionally filters the returned values. If keys is set to ALL (default) it will return the scroll size as dictionary, otherwise it will just return the single value selected by the key. |
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the counting |
message | overrides the default error message for assertion. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Optionally asserts that the state matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
See Get BoundingBox for more similar examples.
Example use:
Returns attributes of options of a select
element as a list of dictionaries.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
Returned dictionaries have the following keys and their values "index", "value", "label" and "selected".
Arguments | Description |
---|---|
selector | Selector from which the info is to be retrieved. See the Finding elements section for details about the selectors. |
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the state |
message | overrides the default error message for assertion. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Optionally asserts that these match the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
Examples
Returns the specified attribute of selected options of the select
element.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
option_attribute | SelectAttribute | label | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | null | ||
message | str, None | None |
Arguments | Description |
---|---|
selector | Selector from which the info is to be retrieved. See the Finding elements section for details about the selectors. |
option_attribute | Which attribute shall be returned/verified. Defaults to label. |
assertion_operator | See Assertions for further details. Defaults to None. |
*assertion_expected | Expected value for the state |
message | overrides the default error message for assertion. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Optionally asserts that these match the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
==
,!=
andcontains
/*=
can work with multiple valuesvalidate
andevaluate
only accepts one single expected value
Other operators are not allowed.
Examples
Gets the computed style properties of the element selected by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
key | str, None | ALL | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None | |
pseudo_element | str, None | None |
Optionally matches with any sequence assertion operator.
Arguments | Description |
---|---|
selector | Selector from which the style shall be retrieved. See the Finding elements section for details about the selectors. |
key | Key of the requested CSS property. Retrieves "ALL" styles as dictionary by default. All css settings can be used as keys even if they are not all returned in the dictionary. |
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the counting |
message | overrides the default error message for assertion. |
pseudo_element | Pseudo element to match. Defaults to None. Pseudo elements are special css |
Pseudo element is a css fuctionality to add styles. Example ::before or ::after.
Keyword uses strict mode, see Finding elements for more details about strict mode.
Optionally asserts that the style matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
Returns the Web Element that has the same column index and same row index as the selected elements.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
table | str | null | |
column | str | null | |
row | str | null |
Arguments | Description |
---|---|
table | selector must select the <table> element that contains both selected elements |
column | selector can select any <th> or <td> element or one of their descendants. |
row | selector can select any <tr> element or one of their descendant like <td> elements. |
column
and row
can also consume index numbers instead of selectors. Indexes are starting from 0
and -1
is specific for the last element.
Selectors for column
and row
are directly appended to table
selector like this: f"{table} >> {row}" .
GitHub | Slack | Real Name |
---|---|---|
mkorpela | @mkorpela | Mikko Korpela |
aaltat | @aaltat | Tatu Aalto |
xylix | @Kerkko Pelttari | Kerkko Pelttari |
Snooz82 | @René | René Rohner |
Examples
Returns the index (0 based) of a table cell within its row.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | int, str | 0 | |
message | str, None | None |
Arguments | Description |
---|---|
selector | can select any <th> or <td> element or one of their descendants. See the Finding elements section for details about the selectors. |
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the counting |
message | overrides the default error message for assertion. |
Examples
Optionally asserts that the index matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
Returns the index (0 based) of a table row.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | int, str | 0 | |
message | str, None | None |
Arguments | Description |
---|---|
selector | can select any <th> or <td> element or one of their descendants. See the Finding elements section for details about the selectors. |
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the counting |
message | overrides the default error message for assertion. |
Examples
Optionally asserts that the index matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
Returns text attribute of the element found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
Keyword can also return input or textarea value property text. See the Finding elements section for details about the selectors.
Arguments | Description |
---|---|
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the state |
message | overrides the default error message for assertion. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Optionally asserts that the text matches the specified assertion. See Assertions for further details for the assertion arguments. By default, assertion is not done.
Examples
Returns the title of the current page.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
Arguments | Description |
---|---|
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the state |
message | overrides the default error message for assertion. |
Optionally asserts that title matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
Returns the current URL.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
Arguments | Description |
---|---|
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the state |
message | overrides the default error message for assertion. |
Optionally asserts that it matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
Returns the current viewport dimensions.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
key | SizeFields | ALL | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None |
Arguments | Description |
---|---|
key | Optionally filters the returned values. If keys is set to ALL (default) it will return the viewport size as dictionary, otherwise it will just return the single value selected by the key. Note: If a single value is retrieved, an assertion does not need a validate combined with a cast of value . |
assertion_operator | See Assertions for further details. Defaults to None. |
assertion_expected | Expected value for the counting |
message | overrides the default error message for assertion. |
Optionally asserts that the state matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
Examples
Navigates to the previous page in history.
Navigates to the next page in history.
Navigates to the given url
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
url | str | null | |
timeout | timedelta, None | None |
Arguments | Description |
---|---|
url | <str> URL to be navigated to. |
timeout | <str> time to wait page to load. If not defined will use the library default timeout. |
Grants permissions to the current context.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
permissions | Permission | null | |
origin | str, None | None |
Arguments | Description |
---|---|
permissions | is a list of permissions to grant. Permissions can be one of the following: geolocation, notifications, camera, microphone, |
origin | The origin to grant permissions to, e.g. "https://example.com". |
Examples
Handle next dialog on page with action
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
action | DialogAction | null | |
prompt_input | str |
Dialog can be any of alert, beforeunload, confirm or prompt. Handling dialogue must be called before the action, like example click, that triggers the dialogue.
If a handler is not set dialogs are dismissed by default.
Arguments | Description |
---|---|
action | How to handle the alert. Can be accept or dismiss . |
prompt_input | The value to enter into prompt. Only valid if action argument equals accept . Defaults to empty string. |
Examples
Adds a highlight to elements matched by the selector
. Provides a style adjustment.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
duration | timedelta | 0:00:05 | |
width | str | 2px | |
style | str | dotted | |
color | str | blue |
Returns the number of highlighted elements. Keyword does not fail, if locator matched zero elements in the page. Keyword does not scroll elements to viewport and highlighted element might be outside the viewport. Use Scroll To Element keyword to scroll element in viewport.
Arguments | Description |
---|---|
selector | Selectors which shall be highlighted. See the Finding elements section for details about the selectors. |
duration | Sets for how long the selector shall be highlighted. Defaults to 5s => 5 seconds. |
width | Sets the width of the higlight border. Defaults to 2px. |
style | Sets the style of the border. Defaults to dotted. |
color | Sets the color of the border. Valid colors i.e. are: red , blue , yellow , pink , black |
Keyword does not fail if selector resolves to multiple elements.
Examples
Moves the virtual mouse and scrolls to the element found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
position_x | float, None | None | |
position_y | float, None | None | |
force | bool | False | |
modifiers | KeyboardModifier | null |
This method hovers over an element matching selector
by performing the following steps:
- Find an element match matching
selector
. If there is none, wait until a matching element is attached to the DOM. - Wait for actionability checks on the matched element, unless
force
option is set. If the element is detached during the checks, the whole action is retried. - Scroll the element into view if needed.
- Use Mouse Move to hover over the center of the element, or the specified
position
.
Arguments | Description | |
---|---|---|
selector | Selector element to hover. See the Finding elements section for details about the selectors. | |
position_x & position_y | A point to hover relative to the top-left corner of element bounding box. If not specified, hovers over some visible point of the element. Only positive values within the bounding-box are allowed. | |
force | Set to True to skip Playwright's [https://playwright.dev/docs/actionability | Actionability checks]. |
*modifiers | Modifier keys to press. Ensures that only these modifiers are pressed during the hover, and then restores current modifiers back. If not specified, currently pressed modifiers are used. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Examples
Performs an HTTP request in the current browser context
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
url | str | null | |
method | RequestMethod | GET | |
body | str, None | None | |
headers | dict, None | None |
Arguments | Description |
---|---|
url | The request url, e.g. /api/foo . |
method | The HTTP method for the request. Defaults to GET. |
body | The request body. GET requests cannot have a body. If the body can be parsed as JSON, the Content-Type header for the request will be automatically set to application/json . Defaults to None. |
headers | A dictionary of additional request headers. Defaults to None. |
The response is a Python dictionary with following attributes:
status
<int> The status code of the response.statusText
<str> Status text corresponding tostatus
, e.g OK or INTERNAL SERVER ERROR.body
<dict> | <str> The response body. If the body can be parsed as a JSON obejct, it will be returned as Python dictionary, otherwise it is returned as a string.headers
<dict> A dictionary containing all response headers.ok
<bool> Whether the request was successfull, i.e. thestatus
is range 200-299.
Here's an example of using Robot Framework dictionary variables and extended variable syntax to do assertions on the response object:
Input text into page with virtual keyboard.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
action | KeyboardInputAction | null | |
input | str | null | |
delay | int, timedelta | 0:00:00 |
Arguments | Description |
---|---|
action | insertText : Dispatches only input event, does not emit the keydown, keyup or keypress events. type : Sends a keydown, keypress/input, and keyup event for each character in the text. |
input | The inputstring to be typed. No special keys possible. |
delay | Time to wait between key presses in Robot Framework's time format. Defaults to 0. |
Attention: Argument type int for 'delay' in milliseconds has been changed to timedelta in Browser 14.0.0. Use Robot Framework time format with units instead.
Note: To press a special key, like Control or ArrowDown, use keyboard.press. Modifier keys DO NOT effect these methods. For testing modifier effects use single key presses with Keyboard Key press
Examples
Press a keyboard key on the virtual keyboard or set a key up or down.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
action | KeyAction | null | |
key | str | null |
Arguments | Description |
---|---|
action | Determine whether the key should be released (up ), hold (down ) or pressed once (press ). down or up are useful for combinations i.e. with Shift. |
key | The key to be pressed. An example of valid keys are: F1 - F12 , Digit0 - Digit9 , KeyA - KeyZ , Backquote , Minus , Equal , Backslash , Backspace , Tab , Delete , Escape , ArrowDown , End , Enter , Home , Insert , PageDown , PageUp , ArrowRight , ArrowUp , etc. |
Useful keys for down
and up
for example are: Shift
, Control
, Alt
, Meta
, ShiftLeft
Example excecution:
Note: Capital letters don't need to be written by the help of Shift. You can type them in directly.
Remove all saved data from the local storage.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
frame_selector | str, None | None |
Arguments | Description |
---|---|
frame_selector | If this selector points to an element inside an iframe, the LocalStorage of that frame is used. Example: iframe[name="test"] >>> body |
Examples
Get saved data from the local storage.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
key | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None | |
frame_selector | str, None | None |
Arguments | Description |
---|---|
key | Named key of the item in the storage. |
assertion_operator | Assertion operator to use. See Assertions for more information. |
assertion_expected | Expected value to compare with. |
message | Custom error message to use. |
frame_selector | If this selector points to an element inside an iframe, the LocalStorage of that frame is used. Example: iframe[name="test"] >>> body |
See Assertions for further details for the assertion arguments. Defaults to None.
Examples
Remove saved data with key from the local storage.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
key | str | null | |
frame_selector | str, None | None |
Arguments | Description |
---|---|
key | The name of the item which shall be deleted. |
frame_selector | If this selector points to an element inside an iframe, the LocalStorage of that frame is used. Example: iframe[name="test"] >>> body |
Examples
Save data to the local storage.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
key | str | null | |
value | str | null | |
frame_selector | str, None | None |
Arguments | Description |
---|---|
key | The name of the key under which it should be saved. |
value | The value which shall be saved as a string. |
frame_selector | If this selector points to an element inside an iframe, the LocalStorage of that frame is used. Example: iframe[name="test"] >>> body |
Examples
Clicks, presses or releases a mouse button.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
action | MouseButtonAction | null | |
x | float, None | None | |
y | float, None | None | |
button | MouseButton | left | |
clickCount | int | 1 | |
delay | int, timedelta | 0:00:00 |
Arguments | Description |
---|---|
action | Defines if it is a mouseclick (click ), holding down a button (down ) or releasing it (up ). |
x , y | Coordinates to move before action is executed. |
button | One of left , middle or up . Defaults to left . |
clickCount | Determine how often the button shall be clicked if action is equal to click . Defaults to 1. |
delay | Delay in Robot Framework time format between the mousedown and mouseup event. Can only be set if the action is click . |
Attention: Argument type int for 'delay' in milliseconds has been changed to timedelta in Browser 14.0.0. Use Robot Framework time format instead. For refactoring just add 'ms' after the delay number.
Delay Example:
Moving the mouse between holding down and releasing it, is possible with Mouse Move.
Examples
Instead of selectors command mouse with coordinates. The Click commands will leave the virtual mouse on the specified coordinates.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
x | float | null | |
y | float | null | |
steps | int | 1 |
Arguments | Description |
---|---|
x & y | Are absolute coordinates starting at the top left of the page. |
steps | Number of intermediate steps for the mouse event. Often it is nessesary to send more than one intermediate event to get the desired result. Defaults to 1. |
Examples
Moves the mouse cursor relative to the selected element.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
x | float | 0.0 | |
y | float | 0.0 | |
steps | int | 1 |
Arguments | Description |
---|---|
selector | Identifies the element, which center is the start-point. |
x & y | Are relative coordinates to the center of the elements bounding box. |
steps | Number of intermediate steps for the mouse event. Often it is nessesary to send more than one intermediate event to get the desired result. Defaults to 1. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Examples
Create a new playwright Browser with specified options.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
browser | SupportedBrowsers | chromium | |
headless | bool | True | |
null | |||
args | List[str], None | None | |
channel | str, None | None | |
chromiumSandbox | bool | False | |
devtools | bool | False | |
downloadsPath | str, None | None | |
env | Dict, None | None | |
executablePath | str, None | None | |
firefoxUserPrefs | Dict[str, str | int | float | bool], None | None | |
handleSIGHUP | bool | True | |
handleSIGINT | bool | True | |
handleSIGTERM | bool | True | |
ignoreDefaultArgs | List[str], bool, None | None | |
proxy | Proxy, None | None | |
reuse_existing | bool | True | |
slowMo | timedelta | 0:00:00 | |
timeout | timedelta | 0:00:30 |
See Browser, Context and Page for more information about Browser and related concepts.
Returns a stable identifier for the created browser.
Arguments | Description |
---|---|
browser | Opens the specified browser. Defaults to chromium. |
headless | Set to False if you want a GUI. Defaults to True. |
args | Additional arguments to pass to the browser instance. The list of Chromium flags can be found here. Defaults to None. |
channel | Allows to operate against the stock Google Chrome and Microsoft Edge browsers. For more details see: Playwright documentation. |
chromiumSandbox | Enable Chromium sandboxing. Defaults to False. |
devtools | Chromium-only Whether to auto-open a Developer Tools panel for each tab. |
downloadsPath | If specified, accepted downloads are downloaded into this folder. Otherwise, temporary folder is created and is deleted when browser is closed. |
env | Specifies environment variables that will be visible to the browser. Dictionary keys are variable names, values are the content. Defaults to None. |
executablePath | Path to a browser executable to run instead of the bundled one. If executablePath is a relative path, then it is resolved relative to current working directory. Note that Playwright only works with the bundled Chromium, Firefox or WebKit, use at your own risk. Defaults to None. |
firefoxUserPrefs |Firefox user preferences. Learn more about the Firefox user preferences at about:config. | |
handleSIGHUP | Close the browser process on SIGHUP. Defaults to True. |
handleSIGINT | Close the browser process on Ctrl-C. Defaults to True. |
handleSIGTERM | Close the browser process on SIGTERM. Defaults to True. |
ignoreDefaultArgs | If True, Playwright does not pass its own configurations args and only uses the ones from args. If a list is given, then filters out the given default arguments. Dangerous option; use with care. Defaults to False. |
proxy | Network Proxy settings. Structure: {'server': <str>, 'bypass': <Optional[str]>, 'username': <Optional[str]>, 'password': <Optional[str]>} |
reuse_existing | If set to True, an existing browser instance, that matches the same arguments, will be reused. If no same configured Browser exist, a new one is started. Defaults to True. |
slowMo | Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to no delay. |
timeout | Maximum time in Robot Framework time format to wait for the browser instance to start. Defaults to 30 seconds. Pass 0 to disable timeout. |
Create a new BrowserContext with specified options.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
null | |||
acceptDownloads | bool | True | |
baseURL | str, None | None | |
bypassCSP | bool | False | |
colorScheme | ColorScheme, None | None | |
defaultBrowserType | SupportedBrowsers, None | None | |
deviceScaleFactor | float, None | None | |
extraHTTPHeaders | Dict[str, str], None | None | |
forcedColors | ForcedColors | none | |
geolocation | GeoLocation, None | None | |
hasTouch | bool, None | None | |
hideRfBrowser | Deprecated | ||
httpCredentials | HttpCredentials, None | None | |
ignoreHTTPSErrors | bool | False | |
isMobile | bool, None | None | |
javaScriptEnabled | bool | True | |
locale | str, None | None | |
offline | bool | False | |
permissions | List[Permission], None | None | |
proxy | Proxy, None | None | |
recordHar | RecordHar, None | None | |
recordVideo | RecordVideo, None | None | |
reducedMotion | ReduceMotion | no_preference | |
screen | Dict[str, int], None | None | |
serviceWorkers | ServiceWorkersPermissions, None | allow | |
storageState | str, None | None | |
timezoneId | str, None | None | |
tracing | str, None | None | |
userAgent | str, None | None | |
viewport | ViewportDimensions, None | {'width': 1280, 'height': 720} |
See Browser, Context and Page for more information about BrowserContext.
Returns a stable identifier for the created context that can be used in Switch Context.
Arguments | Description |
---|---|
acceptDownloads | Whether to automatically download all the attachments. Defaults to True where all the downloads are accepted. |
baseURL | When using Go To, Wait For Request or Wait For Response it takes the base URL in consideration by using the URL() constructor for building the corresponding URL. Unset by default. Examples: baseURL=http://localhost:3000 and navigating to /bar.html results in http://localhost:3000/bar.html . baseURL=http://localhost:3000/foo/ and navigating to ./bar.html results in http://localhost:3000/foo/bar.html . baseURL=http://localhost:3000/foo (without trailing slash) and navigating to ./bar.html results in http://localhost:3000/bar.html . |
bypassCSP | Toggles bypassing page's Content-Security-Policy. Defaults to False. |
colorScheme | Emulates 'prefers-colors-scheme' media feature, supported values are 'light', 'dark', 'no-preference'. |
defaultBrowserType | If no browser is open and New Context opens a new browser with defaults, it now uses this setting. Very useful together with Get Device keyword. |
deviceScaleFactor | Specify device scale factor (can be thought of as dpr). Defaults to 1 . |
extraHTTPHeaders | A dictionary containing additional HTTP headers to be sent with every request. All header values must be strings. |
forcedColors | Emulates forced-colors media feature, supported values are active and none. |
geolocation | A dictionary containing latitude and longitude or accuracy to emulate. If latitude or longitude is not specified, the device geolocation won't be overriden. |
hasTouch | Specifies if viewport supports touch events. Defaults to False. |
hideRfBrowser | DEPRECATED --has no function-- |
httpCredentials | Credentials for HTTP authentication. |
ignoreHTTPSErrors | Whether to ignore HTTPS errors during navigation. Defaults to False. |
isMobile | Whether the meta viewport tag is taken into account and touch events are enabled. Defaults to False. |
javaScriptEnabled | Whether or not to enable JavaScript in the context. Defaults to True. |
locale | Specify user locale, for example en-GB , de-DE , etc. |
offline | Toggles browser's offline mode. Defaults to False. |
permissions | A dictionary containing permissions to grant to all pages in this context. All permissions that are not listed here will be automatically denied. |
proxy | Network proxy settings to use with this context. Defaults to None. NOTE: For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example proxy={ server: 'http://per-context' } . |
recordHar | Enables HAR recording for all pages into to a file. Must be path to file, example ${OUTPUT_DIR}/har.file. If not specified, the HAR is not recorded. Make sure to await context to close for the to be saved. |
recordVideo | Enables video recording for all pages into a folder. If not specified videos are not recorded. Make sure to close context for videos to be saved. |
reduceMotion | Emulates prefers-reduced-motion media feature, supported values are reduce, no-preference. |
screen | Emulates consistent window screen size available inside web page via window.screen. Is only used when the viewport is set. Example {'width': 414, 'height': 896} |
serviceWorkers | Whether to allow sites to register Service workers. Defaults to 'allow'. |
storageState | Restores the storage stated created by the Save Storage State keyword. Must mbe full path to the file. |
timezoneId | Changes the timezone of the context. See ICU`s metaZones.txt for a list of supported timezone IDs. |
tracing | File name where the tracing file is saved. Example trace.zip will be saved to ${OUTPUT_DIR}/traces.zip. Temporary trace files will be saved to ${OUTPUT_DIR}/Browser/traces. If file name is defined, tracing will be enabled for all pages in the context. Tracing is automatically closed when context is closed. Temporary trace files will be automatically deleted at start of each test execution. Trace file can be opened after the test execution by running command from shell: rfbrowser show-trace -F /path/to/trace.zip . |
userAgent | Specific user agent to use in this context. |
viewport | A dictionary containing width and height . Emulates consistent viewport for each page. Defaults to 1280x720. null disables the default viewport. If width and height is 0 , the viewport will scale with the window. |
Examples
A BrowserContext is the Playwright object that controls a single browser profile. Within a context caches and cookies are shared. See Playwright browser.newContext for a list of supported options.
If there's no open Browser this keyword will open one. Does not create pages.
Open a new Page.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
url | str, None | None |
A Page is the Playwright equivalent to a tab. See Browser, Context and Page for more information about Page concept.
Arguments | Description |
---|---|
url | Optional URL to navigate the page to. The url should include protocol, e.g. https:// |
Returns NewPageDetails as dictionary for created page. NewPageDetails (dict) contains the keys page_id
and video_path
. page_id
is a stable identifier for the created page. video_path
is path to the created video or empty if video is not created.
When a New Page is called without an open browser, New Browser and New Context are executed with default values first.
Open a new persistent context.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
userDataDir | str | ||
browser | SupportedBrowsers | chromium | |
headless | bool | True | |
null | |||
acceptDownloads | bool | True | |
args | List[str], None | None | |
baseURL | str, None | None | |
bypassCSP | bool | False | |
channel | str, None | None | |
chromiumSandbox | bool | False | |
colorScheme | ColorScheme, None | None | |
defaultBrowserType | SupportedBrowsers, None | None | |
deviceScaleFactor | float, None | None | |
devtools | bool | False | |
downloadsPath | str, None | None | |
env | Dict, None | None | |
executablePath | str, None | None | |
extraHTTPHeaders | Dict[str, str], None | None | |
forcedColors | ForcedColors | none | |
geolocation | GeoLocation, None | None | |
handleSIGHUP | bool | True | |
handleSIGINT | bool | True | |
handleSIGTERM | bool | True | |
hasTouch | bool, None | None | |
hideRfBrowser | Deprecated | ||
httpCredentials | HttpCredentials, None | None | |
ignoreDefaultArgs | List[str], bool, None | None | |
ignoreHTTPSErrors | bool | False | |
isMobile | bool, None | None | |
javaScriptEnabled | bool | True | |
locale | str, None | None | |
offline | bool | False | |
permissions | List[Permission], None | None | |
proxy | Proxy, None | None | |
recordHar | RecordHar, None | None | |
recordVideo | RecordVideo, None | None | |
reducedMotion | ReduceMotion | no_preference | |
screen | Dict[str, int], None | None | |
serviceWorkers | ServiceWorkersPermissions, None | allow | |
slowMo | timedelta | 0:00:00 | |
storageState | Deprecated | ||
timeout | timedelta | 0:00:30 | |
timezoneId | str, None | None | |
tracing | str, None | None | |
url | str, None | None | |
userAgent | str, None | None | |
viewport | ViewportDimensions, None | {'width': 1280, 'height': 720} |
New Persistent Context does basically executes New Browser, New Context and New Page in one step with setting a profile at the same time.
This keyword returns a tuple of browser id, context id and page details. (New in Browser 15.0.0)
Argument | Description |
---|---|
userDataDir | Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for Chromium and Firefox. Note that Chromium's user data directory is the parent directory of the "Profile Path" seen at chrome://version. Pass an empty string to use a temporary directory instead. |
browser | Browser type to use. Default is Chromium. |
headless | Whether to run browser in headless mode. Defaults to True . |
storageState & hideRfBrowser | These arguments have no function and will be removed soon. |
other arguments | Please see New Browser, New Context and New Page for more information about the other arguments. |
If you want to use extensions you need to download the extension as a .zip, enable loading the extension, and load the extensions using chromium arguments like below. Extensions only work with chromium and with a headful browser.
Check New Browser, New Context and New Page for the specific argument docs.
Opens a new browser instance. Use this keyword for quick experiments or debugging sessions.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
url | str, None | None | |
browser | SupportedBrowsers | chromium | |
headless | bool | False | |
pause_on_failure | bool | True | |
bypassCSP | True |
Use New Page directly instead of Open Browser for production and automated execution. See Browser, Context and Page for more information about Browser and related concepts.
Creates a new browser, context and page with specified settings.
Argument | Description |
---|---|
url | Navigates to URL if provided. Defaults to None. |
browser | Specifies which browser to use. The supported browsers are listed in the table below. |
headless | If set to False, a GUI is provided otherwise it is hidden. Defaults to False. |
pause_on_failure | Stop execution when failure detected and leave browser open. Defaults to True. |
bypassCSP | Defaults to bypassing CSP and enabling custom script attach to the page. |
Browsers:
Types the given key combination into element found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
keys | str | null |
Arguments | Description |
---|---|
selector | Selector of the text field. See the Finding elements section for details about the selectors. |
*keys | Keys to be press after each other. Using + to chain combine modifiers with a single keypress Control+Shift+T is supported. |
Supports values like "a, b" which will be automatically typed.
Also supports identifiers for keys like ArrowLeft
or Backspace
.
Keyword uses strict mode, see Finding elements for more details about strict mode.
See playwright's documentation for a more comprehensive list of supported input keys. Playwright docs for press.
Examples
Wrap a Browser library keyword and make it a promise.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
kw | str | null | |
args | null |
Promised keyword is executed and started on background. Test execution continues without waiting for kw
to finish.
Returns reference to the promised keyword.
kw
Keyword that will work async on background.
Arguments | Description |
---|---|
kw | Keyword that will work async on background. |
*args | Keyword arguments as normally used. |
Examples
Returns a promise that resolves when file from path
has been uploaded.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
path | PathLike | null |
Fails if the upload has not happened during timeout.
Upload file from path
into next file chooser dialog on page.
Arguments | Description |
---|---|
path | Path to file to be uploaded. |
Example use:
Alternatively, you can use Upload File By Selector keyword.
Returns a promise that waits for next download event on page.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
saveAs | str |
If you can get the URL for the file to download, Download
keyword should be a consistent way to download the file.
To enable downloads context's acceptDownloads
needs to be true.
To configure download directory use New Browser's downloadsPath
settings
With default filepath downloaded files are deleted when Context the download happened in is closed.
Arguments | Description |
---|---|
saveAs | Defines path where the file is saved. File will also temporarily be saved in playwright context's default download location. |
Waited promise returns a dictionary which contains saveAs and suggestedFilename as keys. The saveAs contains where the file is downloaded and suggestedFilename contains the name suggested name for the download. The suggestedFilename is typically computed by the browser from the Content-Disposition response header or the download attribute. See the spec on whatwg. Different browsers can use different logic for computing it.
Example usage:
Record the selector that is under mouse.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
label | str, None | None |
Arguments | Description |
---|---|
label | text to show when on the box in the page while recording. |
Focus on the page and move mouse over the element you want to select.
Examples
Sets the keyword to execute, when a Browser keyword fails.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
keyword | str, None | null | |
args | str | null | |
scope | Scope | Global |
Arguments | Description |
---|---|
keyword | The name of a keyword that will be executed if a Browser keyword fails. It is possible to use any available keyword, including user keywords or keywords from other libraries. |
*args | The arguments to the keyword if any. |
scope | Scope defines the live time of this setting. Available values are Global , Suite or Test / Task . See Scope Settings for more details. |
The initial keyword to use is set when importing the library, and the keyword that is used by default is Take Screenshot. Taking a screenshot when something failed is a very useful feature, but notice that it can slow down the execution.
It is possible to use string NONE
or any other robot falsy name, case-insensitively, as well as Python None
to disable this feature altogether.
This keyword returns an object which contains the the previously registered failure keyword. The return value can be always used to restore the original value later. The returned object contains keyword name and the possible arguments used to for the keyword.
Examples
Reloads current active page.
Saves the current active context storage state to a file.
Web apps use cookie-based or token-based authentication, where authenticated state is stored as cookies or in local storage. Keyword retrieves the storage state from authenticated contexts and save it to disk. Then New Context can be created with prepopulated state.
Please note state file may contains secrets and should not be shared with people outside of your organisation.
The file is created in ${OUTPUTDIR}/browser/state folder and file(s) are automatically deleted when new test execution starts. File path is returned by the keyword.
Examples
Scrolls an element or the page relative from current position by the given values.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str, None | None | |
vertical | str | height | |
horizontal | str | 0 | |
behavior | ScrollBehavior | auto |
Arguments | Description |
---|---|
selector | Selector of the element. If the selector is ${None} or ${Empty} the page itself is scrolled. To ensure an element is in view use Hover instead. See the Finding elements section for details about the selectors. |
vertical | defines how far and in which direction to scroll vertically. It can be a positive or negative number. Positive scrolls down, like 50 , negative scrolls up, like -50 . It can be a percentage value of the absolute scrollable size, like 9.95% or negative like -10% . It can be the string height to defining to scroll exactly one visible height down or up with -height . Be aware that some pages do lazy loading and load more content once you scroll down. The percentage of the current scrollable height is used and may change. |
horizontal | defines where to scroll horizontally. Works same as vertical but defines positive values for right and negative values for left. width defines to scroll exactly one visible range to the right. |
behavior | defines whether the scroll happens directly or it scrolls smoothly. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Scrolls an element or the page to an absolute position based on given coordinates.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str, None | None | |
vertical | str | top | |
horizontal | str | left | |
behavior | ScrollBehavior | auto |
Arguments | Description | |
---|---|---|
selector | Selector of the element. If the selector is ${None} or ${Empty} the page itself is scrolled. To ensure an element is in view use Hover instead. See the Finding elements section for details about the selectors. | |
vertical | defines where to scroll vertically. It can be a positive number, like 300 . It can be a percentage value of the absolute scrollable size, like 50% . It can be a string defining that top or the bottom of the scroll area. < top | bottom > Be aware that some pages do lazy loading and load more content once you scroll down. Bottom defines the current known bottom coordinate. |
horizontal | defines where to scroll horizontally. Works same as vertical but defines < left | right > as start and end. |
behavior | defines whether the scroll happens directly or it scrolls smoothly. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
This method waits for actionability checks, then tries to scroll element into view, unless it is completely visible.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null |
Arguments | Description |
---|---|
selector | Selector of the checkbox. See the Finding elements section for details about the selectors. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Does nothing if the element is already visible.
Selects options from select element found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
attribute | SelectAttribute | null | |
values | null |
Arguments | Description |
---|---|
selector | Selector of the <select> tag. See the Finding elements section for details about the selectors. |
attribute | Attribute to select options by. Can be value , label , text or index . Where label and text are same. |
*values | Values to select. |
Returns list of options which keyword was able to select. The type of list item matches to attribute
definition. Example if attribute
equals to label returned list contains label values. Or in case of index it contains list of selected indexes.
Keyword uses strict mode, see Finding elements for more details about strict mode.
If no values to select are passed will deselect options in element.
Examples
Remove all saved data from the session storage.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
frame_selector | str, None | None |
Arguments | Description |
---|---|
frame_selector | If this selector points to an element inside an iframe, the SessionStorage of that frame is used. Example: iframe[name="test"] >>> body |
Examples
Get saved data from from session storage.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
key | str | null | |
assertion_operator | AssertionOperator, None | None | |
assertion_expected | Any, None | None | |
message | str, None | None | |
frame_selector | str, None | None |
Arguments | Description |
---|---|
key | Named key of the item in the storage. |
assertion_operator | Assertion operator to use. See Assertions for more information. |
assertion_expected | Expected value to compare with. |
message | Custom error message to use. |
frame_selector | If this selector points to an element inside an iframe, the SessionStorage of that frame is used. Example: iframe[name="test"] >>> body |
Examples
Remove saved data with key from the session storage.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
key | str | null | |
frame_selector | str, None | None |
Arguments | Description |
---|---|
key | The name of the item which shall be deleted. |
frame_selector | If this selector points to an element inside an iframe, the SessionStorage of that frame is used. Example: iframe[name="test"] >>> body |
Examples
Save data to session storage.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
key | str | null | |
value | str | null | |
frame_selector | str, None | None |
Arguments | Description |
---|---|
key | The name of the key under which it should be saved. |
value | The value which shall be saved as a string. |
frame_selector | If this selector points to an element inside an iframe, the SessionStorage of that frame is used. Example: iframe[name="test"] >>> body |
Examples
Set keywords formatters for assertions.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
formatters | Dict[str, List[str]] | null |
formatters
is dictionary, where key is the keyword name where formatters are applied. Dictionary value is a list of formatter which are applied. Using keywords always replaces existing formatters for keywords.
Supported formatter are: normalize space, strip and apply to expected.
Examples
Sets the timeout used by most input and getter keywords.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
timeout | timedelta | null | |
scope | Scope | Suite |
Arguments | Description |
---|---|
timeout | Timeout of it is for current playwright context and for new contexts. Supports Robot Framework time format . Returns the previous value of the timeout. |
scope | Scope defines the live time of that setting. Available values are Global , Suite or Test / Task . See Scope Settings for more details. |
Examples
Set default runBeforeUnload value when Close Page is called indirectly.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
runBeforeUnload | bool | null |
Close Page is called indirectly when automatic page closing is done. The default value is false and this keyword can be used to change value. Returns the old runBeforeUnload value.
Updated the correct Context's geolocation.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
latitude | float | null | |
longitude | float | null | |
accuracy | float, None | None |
Latitude can be between -90 and 90 and longitude can be between -180 and 180. Accuracy of the location must be positive number and defaults to 0. When creating context, grant geolocation
permission for pages to read its geolocation.
Arguments | Description |
---|---|
latitude | Latitude between -90 and 90. |
longitude | Longitude between -180 and 180. |
accuracy | Non-negative accuracy value. Defaults to 0. |
Examples
Toggles current Context's offline emulation.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
offline | bool | True |
Arguments | Description |
---|---|
offline | Toggles the offline mode. Set to False to switch back to online mode. Defaults to True. |
Sets the timeout used in retrying assertions when they fail.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
timeout | timedelta | null | |
scope | Scope | Suite |
Arguments | Description |
---|---|
timeout | Assertion retry timeout will determine how long Browser library will retry an assertion to be true. |
scope | Scope defines the live time of that setting. Available values are Global , Suite or Test / Task . See Scope for more details. |
The other keyword Set Browser timeout controls how long Playwright will perform waiting in the node side for Elements to fulfill the requirements of the specific keyword.
Returns the previous value of the assertion retry timeout.
Examples
Example waits 10 seconds on Playwright to get the page title and library will retry 30 seconds to make sure that title is correct.
Sets the prefix for all selectors in the given scope.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
prefix | str, None | null | |
scope | Scope | Suite |
Arguments | Description |
---|---|
prefix | Prefix for all selectors. Prefix and selector will be separated by a single space. |
scope | Scope defines the live time of that setting. Available values are Global , Suite or Test / Task . See Scope for more details. |
Returns the previous value of the prefix.
Examples
Example will click on button with id login_btn
inside iframe with id embedded_page
. The resulting selector will be iframe#embedded_page >>> button#login_btn
.
Controls library strict mode.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
mode | bool | null | |
scope | Scope | Suite |
Arguments | Description |
---|---|
mode | When set to True , keywords that are searching elements will use Playwright strict mode. Keyword changes library strict mode value and keyword also return the previous strict mode value. |
scope | Scope defines the live time of that setting. Available values are Global , Suite or Test / Task . See Scope for more details. |
Examples
Sets current Pages viewport size to specified dimensions.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
width | int | null | |
height | int | null |
In the case of multiple pages in a single browser, each page can have its own viewport size. However, New Context allows to set viewport size (and more) for all later opened pages in the context at once.
Set Viewport Size will resize the page. A lot of websites don't expect phones to change size, so you should set the viewport size before navigating to the page with New Context before opening the page itself.
Arguments | Description |
---|---|
width | Sets the width size. |
height | Sets the height size. |
Controls if the keyword banner is shown on page or not.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
show | bool | True | |
style | str | ||
scope | Scope | Suite |
Keyword call banner is a css overlay that shows the currently executed keyword directly on page. This is useful for debugging and for showing the test execution on video recordings. By default, the banner is not shown on page except when running in presenter mode.
The banner can be controlled by an import setting of Browser library. (see Importing section)
Arguments | Description |
---|---|
show | If True banner is shown on page. If False banner is not shown on page. If None banner is shown on page only when running in presenter mode. |
style | Additional css styles to be applied to the banner. These styles are css settings and may override the existing ones for the banner. |
scope | Scope defines the live time of that setting. Available values are Global , Suite or Test / Task . See Scope for more details. |
Examples
Switches the currently active Browser to another open Browser.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
id | str | null |
Returns a stable identifier for the previous browser. See Browser, Context and Page for more information about Browser and related concepts.
Arguments | Description |
---|---|
id | The id of the browser to switch to. Example: browser=96207191-8147-44e7-b9ac-5e04f2709c1d . A browser id is returned by New Browser when it is started or can be fetched from the browser catalog when returned by Get Browser Catalog. |
Switches the active BrowserContext to another open context.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
id | str | null | |
browser | SelectionType, str | CURRENT |
Returns a stable identifier for the previous context. See Browser, Context and Page for more information about Context and related concepts.
Arguments | Description |
---|---|
id | The id of the context to switch to. Example: context=525d8e5b-3c4e-4baa-bfd4-dfdbc6e86089 . A context id is returned by New Context when it is started or can be fetched from the browser catalog when returned by Get Browser Catalog. |
browser | The browser in which to search for that context. CURRENT for the currently active browser, ALL to search in all open browsers or the id of the browser where to switch context. |
Examples
Switches the active browser page to another open page by id
or NEW
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
id | NewPageDetails, str | null | |
context | SelectionType, str | CURRENT | |
browser | SelectionType, str | CURRENT |
Returns a stable identifier id
for the previous page. See Browser, Context and Page for more information about Page and related concepts.
Arguments | Description |
---|---|
id | The id or alias of the page to switch to. Example: page=8baf2991-5eaf-444d-a318-8045f914e96a or NEW . Can be a string or a dictionary returned by New Page Keyword. A page id can be fetched from the browser catalog when returned by Get Browser Catalog. NEW can be used to switch to a pop-up that just has been opened by the webpage, CURRENT can be used to switch to the active page of a different context or browser, identified by their id. |
context | The context in which to search for that page. CURRENT for the currently active context, ALL to search in all open contexts or the id of the context where to switch page. |
browser | The browser in which to search for that page. CURRENT for the currently active browser, ALL to search in all open browsers or the id of the browser where to switch page. |
New
may timeout if no new pages exists before library timeout.
Examples
Takes a screenshot of the current window or element and saves it to disk.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
filename | str, None | robotframework-browser-screenshot-{index} | |
selector | str, None | None | |
null | |||
crop | BoundingBox, None | None | |
disableAnimations | bool | False | |
fileType | ScreenshotFileTypes | png | |
fullPage | bool | False | |
log_screenshot | bool | True | |
mask | List[str], str | ||
maskColor | str, None | None | |
omitBackground | bool | False | |
quality | int, None | None | |
scale | Scale, None | None | |
return_as | ScreenshotReturnType | path_string | |
timeout | timedelta, None | None |
Arguments | Description |
---|---|
filename | Filename into which to save. The file will be saved into the robot framework ${OUTPUTDIR}/browser/screenshot directory by default, but it can be overwritten by providing custom path or filename. String {index} in filename will be replaced with a rolling number. Use this to not override filenames. If filename equals to EMBED (case insensitive) or ${NONE}, then screenshot is embedded as Base64 image to the log.html. The image is saved temporally to the disk and warning is displayed if removing the temporary file fails. The ${OUTPUTDIR}/browser/ is removed at the first suite startup. |
selector | Take a screenshot of the element matched by selector. See the Finding elements section for details about the selectors. If not provided take a screenshot of current viewport. |
crop | Crops the taken screenshot to the given box. It takes same dictionary as returned from Get BoundingBox. Cropping only works on page screenshot, so if no selector is given. |
disableAnimations | When set to True , stops CSS animations, CSS transitions and Web Animations. Animations get different treatment depending on their duration: - finite animations are fast-forwarded to completion, so they'll fire transitionend event. - infinite animations are canceled to initial state, and then played over after the screenshot. |
fileType | png or jpeg Specify screenshot type, defaults to png . |
fullPage | When True, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Defaults to False. |
log_screenshot | When set to False the screenshot is taken but not logged into log.html. |
mask | Specify selectors that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box #FF00FF that completely covers its bounding box. Argument can take a single selector string or a list of selector strings if multiple different elements should be masked. |
maskColor | Specify the color of the overlay box for masked elements, in CSS color format. Default color is pink #FF00FF. |
omitBackground | Hides default white background and allows capturing screenshots with transparency. Not applicable to jpeg images. |
quality | The quality of the image, between 0-100. Not applicable to png images. |
scale | css or device . css will reduce the image size and device keeps image in original size. Defaults to device . |
return_as | Defines what this keyword returns. Possible values are documented in ScreenshotReturnType. It can be either a path to the screenshot file as string or Path object, or the image data as bytes or base64 encoded string. |
timeout | Maximum time how long taking screenshot can last, defaults to library timeout. Supports Robot Framework time format, like 10s or 1 min, pass 0 to disable timeout. The default value can be changed by using the Set Browser Timeout keyword. |
Keyword uses strict mode if selector is defined. See Finding elements for more details about strict mode.
Example
Simulates tap on the element found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
modifiers | KeyboardModifier | null | |
force | bool | False | |
noWaitAfter | bool | False | |
position_x | int, None | None | |
position_y | int, None | None | |
trial | bool | False |
Requires that the hasTouch
option of the New Context be set to true. This method taps the element by performing the following steps:
- Wait for actionability checks on the element, unless force option is set.
- Scroll the element into view if needed.
- Use page.touchscreen to tap the center of the element, or the specified position.
- Wait for initiated navigations to either succeed or fail, unless noWaitAfter option is set.
Arguments | Description |
---|---|
selector | Selector element to click. See the Finding elements section for details about the selectors. |
*modifiers | Modifier keys to press. Ensures that only these modifiers are pressed during the click, and then restores current modifiers back. If not specified, currently pressed modifiers are used. Modifiers can be specified in any order, and multiple modifiers can be specified. Valid modifier keys are Control , Alt , Shift and Meta . |
force | Whether to bypass the actionability checks. Defaults to false. |
noWaitAfter | Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to False . |
position_x position_y | A point to click relative to the top-left corner of element bounding-box. Only positive values within the bounding-box are allowed. If not specified, clicks to some visible point of the element. |
trial | When set, this method only performs the actionability checks and skips the action. Defaults to False . |
Examples
Types the given secret from variable_name
into the text field found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
secret | str | null | |
delay | timedelta | 0:00:00 | |
clear | bool | True |
This keyword does not log secret in Robot Framework logs, if keyword resolves the variable value internally. If enable_playwright_debug
is enabled in the library import, secret will be always visible as plain text in the playwright debug logs, regardless of the Robot Framework log level.
Arguments | Description |
---|---|
selector | Selector of the text field. See the Finding elements section for details about the selectors. |
secret | Environment variable name with % prefix or a local variable with $ prefix that has the secret text value. Variable names can be used with and without curly braces. |
delay | Delay between the single key strokes. It may be either a number or a Robot Framework time string. Time strings are fully explained in an appendix of Robot Framework User Guide. Defaults to 0 ms . Example: 50 ms |
clear | Set to false, if the field shall not be cleared before typing. Defaults to true. |
This keyword does not log secret in Robot Framework logs, when keyword resolves the secret
variable internally. When secret
variable is prefixed with $, without the curly braces, library will resolve the corresponding Robot Framework variable.
If secret
variable is prefixed with %, library will resolve corresponding environment variable. Example $Password` will resolve to ${Password}
Robot Framework variable. Also %ENV_PWD
will resolve to %{ENV_PWD}
environment variable.
Using normal Robot Framework variables like ${password}
will not work!
Normal plain text will not work. If you want to use plain text, use Type Text keyword instead.
This keyword will also work with a give cryptographic cipher text, that has been encrypted by Crypto library. See Crypto Library for more details.
Keyword uses strict mode, see Finding elements for more details about strict mode.
See Type Text for details.
Example
Types the given txt
into the text field found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
txt | str | null | |
delay | timedelta | 0:00:00 | |
clear | bool | True |
Sends a keydown
, keypress/input
, and keyup
event for each character in the text.
Arguments | Description |
---|---|
selector | Selector of the text field. See the Finding elements section for details about the selectors. |
txt | Text for the text field. |
delay | Delay between the single key strokes. It may be either a number or a Robot Framework time string. Time strings are fully explained in an appendix of Robot Framework User Guide. Defaults to 0 ms . Example: 50 ms |
clear | Set to false, if the field shall not be cleared before typing. Defaults to true. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
See Fill Text for direct filling of the full text at once.
Example
Unchecks the checkbox found by selector
.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
force | bool | False |
Arguments | Description | |
---|---|---|
selector | Selector of the checkbox. See the Finding elements section for details about the selectors. | |
force | Set to True to skip Playwright's [https://playwright.dev/docs/actionability | Actionability checks]. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Does nothing if the element is not checked/selected.
Uploads file from path to file input element matched by selector.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
path | PathLike | null |
Fails if upload is not done before library timeout. Therefor it may be necessary to increase the timeout with Set Browser Timeout.
Arguments | Description |
---|---|
selector | Identifies the file input element. |
path | Path to the file to be uploaded. |
Examples
Waits for promises to finish and returns results from them.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
promises | Future | null |
Returns one result if one promise waited. Otherwise returns an array of results. If one fails, then this keyword will fail.
See Promise To for more information about promises.
For general waiting of elements please see Implicit waiting.
Arguments | Description |
---|---|
promises | Promises to wait for. |
Examples
Returns a promise to wait for next dialog on page, handles it with action
and optionally verifies the dialogs text.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
action | DialogAction | null | |
prompt_input | str | ||
text | str, None | None |
Dialog/alert can be any of alert, beforeunload, confirm or prompt.
Arguments | Description |
---|---|
action | How to handle the alert. Can be accept or dismiss . |
prompt_input | The value to enter into prompt. Only valid if action argument equals accept . Defaults to empty string. |
text | Optional text to verify the dialogs text. |
The main difference between this keyword and Handle Future Dialogs is that Handle Future Dialogs keyword is automatically set as promise. But this keyword must be called as argument to Promise To keyword. Also this keyword can optionally verify the dialogue text and return it. If text
is argument None
or is not set, dialogue text is not verified.
Example with returning text:
Example with text verify:
Waits for all promises to finish.
If one promises fails, then this keyword will fail.
Examples
Waits for a condition, defined with Browser getter keywords to become True.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
condition | ConditionInputs | null | |
args | Any | null | |
timeout | timedelta, None | None | |
message | str, None | None |
This Keyword is basically just a wrapper around our assertion keywords, but with a timeout. It can be used to wait for anything that also can be asserted with our keywords.
In comparison to Robot Frameworks Wait Until Keywords Succeeds this keyword is more readable and easier to use but is limited to Browser libraries assertion keywords.
Arguments | Description |
---|---|
condition | A condition, defined with Browser getter keywords, without the word Get . |
*args | Arguments to pass to the condition keyword. |
timeout | Timout to wait for the condition to become True. Uses default timeout of the library if not set. |
message | Overrides the default error message. |
The easiest way to use this keyword is first starting with an assertion keyword with assertion like: Get Text
Start:
Then you replace the word Get with Wait For Condition and if necessary add the timeout argument.
End:
Example usage:
Waits for the element found by selector
to satisfy state option.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
selector | str | null | |
state | ElementState | visible | |
timeout | timedelta, None | None | |
message | str, None | None |
Note that Browser library has Implicit waiting mechanisms. Depending on the situation you might not need to use Wait for Elements State.
State options could be either appear/disappear from dom, or become visible/hidden. If at the moment of calling the keyword, the selector already satisfies the condition, the keyword will return immediately.
If the selector doesn't satisfy the condition within the timeout the keyword will FAIL.
Arguments | Description |
---|---|
selector | Selector of the corresponding object. See the Finding elements section for details about the selectors. |
state | See ElementState for explanation. |
timeout | uses default timeout from library if not set. |
message | overrides the default error message. The message argument accepts {selector}, {function}, and {timeout} format options. The {function} formatter is same state argument value. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Examples
Polls JavaScript expression or function in browser until it returns a (JavaScript) truthy value.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
function | str | null | |
selector | str | ||
polling | str, timedelta | raf | |
timeout | timedelta, None | None | |
message | str, None | None |
Arguments | Description |
---|---|
function | A valid javascript function or a javascript function body. For example () => true and true will behave similarly. |
selector | Selector to resolve and pass to the JavaScript function. This will be the first argument the function receives. If given a selector a function is necessary, with an argument to capture the elementhandle. For example (element) => document.activeElement === element See the Finding elements section for details about the selectors. |
polling | Default polling value of "raf" polls in a callback for requestAnimationFrame . Any other value for polling will be parsed as a robot framework time for interval between polls. |
timeout | Uses default timeout of the library if not set. |
message | overrides the default error message. The message argument accepts {selector}, {function}, and {timeout} format options. |
Keyword uses strict mode, see Finding elements for more details about strict mode.
Example usage:
Waits for request matching matcher to be made.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
matcher | str, RegExp | ||
timeout | timedelta, None | None |
Arguments | Description |
---|---|
matcher | Request URL matcher. Can be a string (Glob-Pattern), JavaScript RegExp (encapsulated in / with following flags) or JavaScript arrow-function that receives the Request object and returns a boolean. By default (with empty string) matches first available request. For additional information, see the Playwright waitForRequest documentation. |
timeout | Timeout supports Robot Framework time format. Uses default timeout if not set. |
See Wait For Response for more details.
CAUTION: Before Browser library 17.0.0, the matcher
argument was always either a regex or JS function. But the regex did not needed to be in slashes. The most simple way to migrate to the new syntax is to add slashes around the matcher. So /api/get/json
becomes //api/get/json/
.
Waits for response matching matcher and returns the response as robot dict.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
matcher | str, RegExp | ||
timeout | timedelta, None | None |
The response, which is returned by this keyword, is a robot dictionary with following attributes:
status
<int> The status code of the response.statusText
<str> Status text corresponding tostatus
, e.g OK or INTERNAL SERVER ERROR.body
<dict | str> The response body. If the body can be parsed as a JSON object, it will be returned as Python dictionary, otherwise it is returned as a string.headers
<dict> A dictionary containing all response headers.ok
<bool> Whether the request was successful, i.e. thestatus
is range 200-299.request
<dict> containingmethod
<str>,headers
<dict> andpostData
<dict> | <str>url
<str> url of the request.
Arguments | Description |
---|---|
matcher | Request URL matcher. Can be a string (Glob-Pattern), JavaScript RegExp (encapsulated in / with following flags) or JavaScript arrow-function that receives the Response object and returns a boolean. By default (with empty string) matches first available request. For additional information, see the Playwright page.waitForResponse documentation. |
timeout | Timeout supports Robot Framework time format. Uses default timeout if not set. |
CAUTION: Before Browser library 17.0.0, the matcher
argument was always either a regex or JS function. But the regex did not needed to be in slashes. The most simple way to migrate to the new syntax is to add slashes around the matcher. So /api/get/json
becomes //api/get/json/
.
Matcher Examples:
Glob-Pattern:
Glob-Patterns are strings that can contain wildcards. The following wildcards are supported:
Possible wildcards/patterns are:
*
matches any number of characters, except/
**
matches any number of characters, including/
?
matches one character, except/
[abc]
matches one character in the brackets (in this examplea
,b
orc
)[a-z]
matches one character in the range (in this examplea
toz
){foo,bar,baz}
matches one of the strings in the braces (in this examplefoo
,bar
orbaz
)
Examples
RegExp:
Regular Expressions are JavaScript regular expressions encapsulated in /
with optional following flags: Be aware that backslashes need to be escaped in Robot Framework, e.g. \\w
instead of \w
. See regex101 for more information on Regular Expressions.
Example:
JavaScript Arrow-Function:
JavaScript Arrow-Functions are anonymous JavaScript functions that receive the Response object and return a boolean.
Example:
Robot Examples:
Synchronous Example:
Asynchronous Example:
JavaScript Function Example:
Waits until there has been at least one instance of 500 ms of no network traffic on the page after loading.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
timeout | timedelta, None | None |
Doesn't wait for network traffic that wasn't initiated within 500ms of page load.
Arguments | Description |
---|---|
timeout | Timeout supports Robot Framework time format. Uses browser timeout if not set. |