Step
conatus.utils.browser.step
¶
Step module for a page.
This module is used in conjunction with the Page module. Each time a page does
some navigation, a new step is created. Think of it like visiting a new URL, or
clicking a button, etc.
Step
¶
Step(
pw_page: Page,
config: BrowserConfig,
last_step_n: int = -1,
*,
async_init: bool = False
)
Step module for a page.
| ATTRIBUTE | DESCRIPTION |
|---|---|
step_n |
The step number.
TYPE:
|
input_elements |
Input elements in the web page. |
clickable_elements |
Clickable elements in the web page. |
nodes |
Nodes in the web page. |
title |
Title of the web page. |
url |
URL of the web page. |
artifacts |
Step-related artifacts.
TYPE:
|
config |
The browser configuration.
TYPE:
|
pw_page |
The Playwright page.
TYPE:
|
last_step_n |
The number of the last step.
TYPE:
|
input_click_nodes |
Input and clickable nodes in the web page.
TYPE:
|
| PARAMETER | DESCRIPTION |
|---|---|
pw_page
|
The Playwright page.
TYPE:
|
config
|
The browser configuration.
TYPE:
|
last_step_n
|
The number of the last step.
TYPE:
|
async_init
|
Whether this function is called in an async context. Users should not set this parameter. Defaults to False.
TYPE:
|
Source code in conatus/utils/browser/step.py
init_async
async
classmethod
¶
init_async(
pw_page: Page,
config: BrowserConfig,
last_step_n: int = -1,
) -> Step
Create a step in async mode.
| PARAMETER | DESCRIPTION |
|---|---|
pw_page
|
The Playwright page.
TYPE:
|
config
|
The browser configuration.
TYPE:
|
last_step_n
|
The number of the last step.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Step
|
The |