Browsing actions¶
conatus.actions.preloaded.browsing.browser_start
conatus-action
¶
browser_start(
*, headless: bool = True, url: str | None = None
) -> SimpleBrowser
This function is an Action
You can call browser_start just like a regular function, but note that it is
actually a Action object.
This means that:
browser_starthas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Start a browser.
| PARAMETER | DESCRIPTION |
|---|---|
headless
|
Whether to run the browser in headless mode. Defaults to
TYPE:
|
url
|
The URL to go to.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
SimpleBrowser
|
The browser. |
Source code in conatus/actions/preloaded/browsing.py
conatus.actions.preloaded.browsing.browser_start_visible
conatus-action
¶
browser_start_visible() -> SimpleBrowser
This function is an Action
You can call browser_start_visible just like a regular function, but note that it is
actually a Action object.
This means that:
browser_start_visiblehas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Start a browser that is visible.
| RETURNS | DESCRIPTION |
|---|---|
SimpleBrowser
|
The browser. |
conatus.actions.preloaded.browsing.browser_goto
conatus-action
¶
browser_goto(browser: SimpleBrowser, url: str) -> None
This function is an Action
You can call browser_goto just like a regular function, but note that it is
actually a Action object.
This means that:
browser_gotohas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Go to a URL.
Ultimately, if you provide a URL that is invalid, the browser will throw an error.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to use.
TYPE:
|
url
|
The URL to go to.
TYPE:
|
Source code in conatus/actions/preloaded/browsing.py
conatus.actions.preloaded.browsing.browser_close
conatus-action
¶
browser_close(browser: SimpleBrowser) -> None
This function is an Action
You can call browser_close just like a regular function, but note that it is
actually a Action object.
This means that:
browser_closehas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Close the browser.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to close.
TYPE:
|
conatus.actions.preloaded.browsing.browser_get_page_title
conatus-action
¶
browser_get_page_title(browser: SimpleBrowser) -> str
This function is an Action
You can call browser_get_page_title just like a regular function, but note that it is
actually a Action object.
This means that:
browser_get_page_titlehas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Get the title of the current page.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to use.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
The title of the current page. |
Source code in conatus/actions/preloaded/browsing.py
conatus.actions.preloaded.browsing.browser_do_nothing
conatus-action
¶
browser_do_nothing(
browser: SimpleBrowser, *, seconds: float | None = None
) -> None
This function is an Action
You can call browser_do_nothing just like a regular function, but note that it is
actually a Action object.
This means that:
browser_do_nothinghas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Do nothing.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to use.
TYPE:
|
seconds
|
The number of seconds to wait.
TYPE:
|
Source code in conatus/actions/preloaded/browsing.py
conatus.actions.preloaded.browsing.browser_click
conatus-action
¶
browser_click(
browser: SimpleBrowser,
x: float,
y: float,
*,
button: ExtendedMouseButton = "left",
click_count: int = 1
) -> None
This function is an Action
You can call browser_click just like a regular function, but note that it is
actually a Action object.
This means that:
browser_clickhas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Click on an element at a given position.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to use.
TYPE:
|
x
|
The x coordinate of the element to click.
TYPE:
|
y
|
The y coordinate of the element to click.
TYPE:
|
button
|
The button to click on. Defaults to
TYPE:
|
click_count
|
The number of clicks to perform. Defaults to
TYPE:
|
Source code in conatus/actions/preloaded/browsing.py
conatus.actions.preloaded.browsing.browser_mousedown
conatus-action
¶
browser_mousedown(
browser: SimpleBrowser,
*,
x: float | None = None,
y: float | None = None,
button: MouseButton = "left"
) -> None
This function is an Action
You can call browser_mousedown just like a regular function, but note that it is
actually a Action object.
This means that:
browser_mousedownhas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Mouse down on an element at a given position.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to use.
TYPE:
|
x
|
The x coordinate of the element to click.
TYPE:
|
y
|
The y coordinate of the element to click.
TYPE:
|
button
|
The button to click on. Defaults to
TYPE:
|
Source code in conatus/actions/preloaded/browsing.py
conatus.actions.preloaded.browsing.browser_mouseup
conatus-action
¶
browser_mouseup(
browser: SimpleBrowser,
*,
x: float | None = None,
y: float | None = None,
button: MouseButton = "left"
) -> None
This function is an Action
You can call browser_mouseup just like a regular function, but note that it is
actually a Action object.
This means that:
browser_mouseuphas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Mouse up on an element at a given position.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to use.
TYPE:
|
x
|
The x coordinate of the element to click.
TYPE:
|
y
|
The y coordinate of the element to click.
TYPE:
|
button
|
The button to click on. Defaults to
TYPE:
|
Source code in conatus/actions/preloaded/browsing.py
conatus.actions.preloaded.browsing.browser_mouse_move
conatus-action
¶
browser_mouse_move(
browser: SimpleBrowser, x: float, y: float
) -> None
This function is an Action
You can call browser_mouse_move just like a regular function, but note that it is
actually a Action object.
This means that:
browser_mouse_movehas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Move the mouse to a given position.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to use.
TYPE:
|
x
|
The x coordinate of the element to click.
TYPE:
|
y
|
The y coordinate of the element to click.
TYPE:
|
Source code in conatus/actions/preloaded/browsing.py
conatus.actions.preloaded.browsing.browser_drag
conatus-action
¶
browser_drag(
browser: SimpleBrowser, path: list[tuple[float, float]]
) -> None
This function is an Action
You can call browser_drag just like a regular function, but note that it is
actually a Action object.
This means that:
browser_draghas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Drag the mouse.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to use.
TYPE:
|
path
|
The path to drag the mouse to. |
Source code in conatus/actions/preloaded/browsing.py
conatus.actions.preloaded.browsing.browser_scroll
conatus-action
¶
browser_scroll(
browser: SimpleBrowser,
direction: ScrollDirection,
*,
magnitude_px: int | None = None,
magnitude_relative: float | None = None
) -> None
This function is an Action
You can call browser_scroll just like a regular function, but note that it is
actually a Action object.
This means that:
browser_scrollhas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Scroll the browser.
Unless you know what you are doing, you should use the magnitude_relative
argument.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to use.
TYPE:
|
direction
|
The direction to scroll.
TYPE:
|
magnitude_px
|
The magnitude to scroll.
TYPE:
|
magnitude_relative
|
The magnitude to scroll relative to the current viewport size.
TYPE:
|
Source code in conatus/actions/preloaded/browsing.py
conatus.actions.preloaded.browsing.browser_scroll_precise
conatus-action
¶
browser_scroll_precise(
browser: SimpleBrowser,
delta_x: float,
delta_y: float,
*,
start_x: float | None = None,
start_y: float | None = None
) -> None
This function is an Action
You can call browser_scroll_precise just like a regular function, but note that it is
actually a Action object.
This means that:
browser_scroll_precisehas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Scroll the browser precisely.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to use.
TYPE:
|
delta_x
|
The x coordinate of the scroll distance.
TYPE:
|
delta_y
|
The y coordinate of the scroll distance.
TYPE:
|
start_x
|
The x coordinate to start scrolling from.
TYPE:
|
start_y
|
The y coordinate to start scrolling from.
TYPE:
|
Source code in conatus/actions/preloaded/browsing.py
conatus.actions.preloaded.browsing.browser_keypress
conatus-action
¶
browser_keypress(
browser: SimpleBrowser,
keys: list[str],
*,
duration: float = 0
) -> None
This function is an Action
You can call browser_keypress just like a regular function, but note that it is
actually a Action object.
This means that:
browser_keypresshas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Press keys into the page.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to use.
TYPE:
|
keys
|
The keys to press. |
duration
|
The duration to hold the key.
TYPE:
|
Source code in conatus/actions/preloaded/browsing.py
conatus.actions.preloaded.browsing.browser_type
conatus-action
¶
browser_type(browser: SimpleBrowser, text: str) -> None
This function is an Action
You can call browser_type just like a regular function, but note that it is
actually a Action object.
This means that:
browser_typehas additional properties and methods that you can use (see theActiondocumentation for more information);- but it also means that operations like
issubclassandisinstancewill not work as expected.
Type text into the page.
| PARAMETER | DESCRIPTION |
|---|---|
browser
|
The browser to use.
TYPE:
|
text
|
The text to type.
TYPE:
|