code
stringlengths
66
870k
docstring
stringlengths
19
26.7k
func_name
stringlengths
1
138
language
stringclasses
1 value
repo
stringlengths
7
68
path
stringlengths
5
324
url
stringlengths
46
389
license
stringclasses
7 values
def cancel_download(guid: str, browser_context_id: Optional[str] = None) -> Command[Response]: """ Generates a command to cancel a download. Args: guid (str): Global unique identifier of the download. browser_context_id (Optional[str]): The browser context the download b...
Generates a command to cancel a download. Args: guid (str): Global unique identifier of the download. browser_context_id (Optional[str]): The browser context the download belongs to. If not specified, uses the default context. Returns: Comma...
cancel_download
python
autoscrape-labs/pydoll
pydoll/commands/browser_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/browser_commands.py
MIT
def set_download_behavior( behavior: DownloadBehavior, download_path: Optional[str] = None, browser_context_id: Optional[str] = None, events_enabled: bool = True, ) -> Command[Response]: """ Generates a command to set the download behavior for the browser. Ar...
Generates a command to set the download behavior for the browser. Args: behavior (DownloadBehavior): The behavior to set for downloads. download_path (Optional[str]): The path to set for downloads. Returns: Command[Response]: The CDP command that returns a ...
set_download_behavior
python
autoscrape-labs/pydoll
pydoll/commands/browser_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/browser_commands.py
MIT
def get_window_for_target( target_id: str, ) -> Command[GetWindowForTargetResponse]: """ Generates a command to get the window for a given target ID. Args: target_id (str): The target_id to get the window for. Returns: Command[GetWindowForTargetRespo...
Generates a command to get the window for a given target ID. Args: target_id (str): The target_id to get the window for. Returns: Command[GetWindowForTargetResponse]: The CDP command that returns window information including windowId and bounds. ...
get_window_for_target
python
autoscrape-labs/pydoll
pydoll/commands/browser_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/browser_commands.py
MIT
def set_window_bounds(window_id: int, bounds: WindowBoundsDict) -> Command[Response]: """ Generates a command to set the bounds of a window. Args: window_id (int): The ID of the window to set the bounds for. bounds (WindowBoundsDict): The bounds to set for the window, ...
Generates a command to set the bounds of a window. Args: window_id (int): The ID of the window to set the bounds for. bounds (WindowBoundsDict): The bounds to set for the window, which should include windowState and optionally width, height, x, a...
set_window_bounds
python
autoscrape-labs/pydoll
pydoll/commands/browser_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/browser_commands.py
MIT
def set_window_maximized(window_id: int) -> Command[Response]: """ Generates a command to maximize a window. Args: window_id (int): The ID of the window to maximize. Returns: Command[Response]: The CDP command that returns a basic success response ...
Generates a command to maximize a window. Args: window_id (int): The ID of the window to maximize. Returns: Command[Response]: The CDP command that returns a basic success response after maximizing the window.
set_window_maximized
python
autoscrape-labs/pydoll
pydoll/commands/browser_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/browser_commands.py
MIT
def set_window_minimized(window_id: int) -> Command[Response]: """ Generates a command to minimize a window. Args: window_id (int): The ID of the window to minimize. Returns: Command[Response]: The CDP command that returns a basic success response ...
Generates a command to minimize a window. Args: window_id (int): The ID of the window to minimize. Returns: Command[Response]: The CDP command that returns a basic success response after minimizing the window.
set_window_minimized
python
autoscrape-labs/pydoll
pydoll/commands/browser_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/browser_commands.py
MIT
def grant_permissions( permissions: list[PermissionType], origin: Optional[str] = None, browser_context_id: Optional[str] = None, ) -> Command[Response]: """ Generates a command to grant specific permissions to the given origin. Args: permissions (list[Pe...
Generates a command to grant specific permissions to the given origin. Args: permissions (list[PermissionType]): list of permissions to grant. See PermissionType enum for available permissions. origin (Optional[str]): The origin to grant permissions to. ...
grant_permissions
python
autoscrape-labs/pydoll
pydoll/commands/browser_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/browser_commands.py
MIT
def describe_node( node_id: Optional[int] = None, backend_node_id: Optional[int] = None, object_id: Optional[str] = None, depth: Optional[int] = None, pierce: Optional[bool] = None, ) -> Command[DescribeNodeResponse]: """ Describes a DOM node identified by its...
Describes a DOM node identified by its ID without requiring domain to be enabled. The describe_node command is particularly useful in scenarios where you need to quickly gather information about a specific element without subscribing to DOM change events, making it more lightweight for...
describe_node
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def enable(include_whitespace: Optional[IncludeWhitespace] = None) -> Command[Response]: """ Enables DOM agent for the current page. Enabling the DOM domain is a prerequisite for receiving DOM events and using most DOM manipulation methods. The DOM events include changes to the DOM tree...
Enables DOM agent for the current page. Enabling the DOM domain is a prerequisite for receiving DOM events and using most DOM manipulation methods. The DOM events include changes to the DOM tree structure, attribute modifications, and many others. Without enabling this domain first, ...
enable
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def focus( node_id: Optional[int] = None, backend_node_id: Optional[int] = None, object_id: Optional[str] = None, ) -> Command[Response]: """ Focuses the given element. The focus command is crucial for simulating realistic user interactions, as many events (l...
Focuses the given element. The focus command is crucial for simulating realistic user interactions, as many events (like keyboard input) require that an element has focus first. It's also important for testing proper tab order and keyboard accessibility of web pages. Args: ...
focus
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_attributes(node_id: int) -> Command[GetAttributesResponse]: """ Returns attributes for the specified node. Attribute information is essential in web testing and automation because attributes often contain crucial information about element state, behavior, and metadata. T...
Returns attributes for the specified node. Attribute information is essential in web testing and automation because attributes often contain crucial information about element state, behavior, and metadata. This command provides an efficient way to access all attributes of an element ...
get_attributes
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_box_model( node_id: Optional[int] = None, backend_node_id: Optional[int] = None, object_id: Optional[str] = None, ) -> Command[GetBoxModelResponse]: """ Returns box model information for the specified node. The box model is a fundamental concept in CSS that d...
Returns box model information for the specified node. The box model is a fundamental concept in CSS that describes how elements are rendered with content, padding, borders, and margins. This command provides detailed information about these dimensions and coordinates, which is invaluab...
get_box_model
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_document( depth: Optional[int] = None, pierce: Optional[bool] = None ) -> Command[GetDocumentResponse]: """ Returns the root DOM node (and optionally the subtree) to the caller. This is typically the first command called when interacting with the DOM, as it provides ...
Returns the root DOM node (and optionally the subtree) to the caller. This is typically the first command called when interacting with the DOM, as it provides access to the document's root node. From this root, you can traverse to any other element on the page. This command implicitly ...
get_document
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_node_for_location( x: int, y: int, include_user_agent_shadow_dom: Optional[bool] = None, ignore_pointer_events_none: Optional[bool] = None, ) -> Command[GetNodeForLocationResponse]: """ Returns node id at given location on the page. This command is pa...
Returns node id at given location on the page. This command is particularly useful for bridging the gap between visual/pixel-based information and the DOM structure. It allows you to convert screen coordinates to actual DOM elements, which is essential for creating inspection tools or ...
get_node_for_location
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_outer_html( node_id: Optional[int] = None, backend_node_id: Optional[int] = None, object_id: Optional[str] = None, ) -> Command[GetOuterHTMLResponse]: """ Returns node's HTML markup, including the node itself and all its children. This command provides a way ...
Returns node's HTML markup, including the node itself and all its children. This command provides a way to access the complete HTML representation of an element, making it valuable for when you need to extract, analyze, or verify HTML content. It's more comprehensive than just getting ...
get_outer_html
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def move_to( node_id: int, target_node_id: int, insert_before_node_id: Optional[int] = None, ) -> Command[MoveToResponse]: """ Moves node into the new container, placing it before the given anchor. This command allows for more complex DOM restructuring than simple at...
Moves node into the new container, placing it before the given anchor. This command allows for more complex DOM restructuring than simple attribute or content changes. It's particularly useful when testing applications that involve rearranging elements, such as sortable lists, kanban b...
move_to
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def query_selector( node_id: int, selector: str, ) -> Command[QuerySelectorResponse]: """ Executes querySelector on a given node. This method is one of the most fundamental tools for element location, allowing the use of standard CSS selectors to find elements in the...
Executes querySelector on a given node. This method is one of the most fundamental tools for element location, allowing the use of standard CSS selectors to find elements in the DOM. Unlike JavaScript's querySelector, this can be executed on any node (not just document), enabling ...
query_selector
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def query_selector_all( node_id: int, selector: str, ) -> Command[QuerySelectorAllResponse]: """ Executes querySelectorAll on a given node. This method extends querySelector by returning all matching elements rather than just the first one. This is essential for oper...
Executes querySelectorAll on a given node. This method extends querySelector by returning all matching elements rather than just the first one. This is essential for operations that need to process multiple elements, such as extracting data from tables, lists, or grids, or verifying th...
query_selector_all
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def remove_attribute( node_id: int, name: str, ) -> Command[Response]: """ Removes attribute with given name from an element with given id. This command allows direct manipulation of element attributes without using JavaScript in the page context. It's useful for tes...
Removes attribute with given name from an element with given id. This command allows direct manipulation of element attributes without using JavaScript in the page context. It's useful for testing how elements behave when specific attributes are removed or for preparing elements for sp...
remove_attribute
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def remove_node(node_id: int) -> Command[Response]: """ Removes node with given id. This command allows direct removal of DOM elements, which can be useful when testing how an application responds to missing elements or when simplifying a page for focused testing scenarios. ...
Removes node with given id. This command allows direct removal of DOM elements, which can be useful when testing how an application responds to missing elements or when simplifying a page for focused testing scenarios. Args: node_id: Id of the node to remove. ...
remove_node
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def request_child_nodes( node_id: int, depth: Optional[int] = None, pierce: Optional[bool] = None, ) -> Command[Response]: """ Requests that children of the node with given id are returned to the caller. This method is particularly useful when dealing with large DOM ...
Requests that children of the node with given id are returned to the caller. This method is particularly useful when dealing with large DOM trees, as it allows for more efficient exploration by loading children on demand rather than loading the entire tree at once. Child nodes are retu...
request_child_nodes
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def request_node( object_id: str, ) -> Command[RequestNodeResponse]: """ Requests that the node is sent to the caller given the JavaScript node object reference. This method bridges the gap between JavaScript objects in the page context and the CDP's node representation syst...
Requests that the node is sent to the caller given the JavaScript node object reference. This method bridges the gap between JavaScript objects in the page context and the CDP's node representation system, allowing automation to work with elements that might only be available as JavaSc...
request_node
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def resolve_node( node_id: Optional[int] = None, backend_node_id: Optional[int] = None, object_group: Optional[str] = None, execution_context_id: Optional[int] = None, ) -> Command[ResolveNodeResponse]: """ Resolves the JavaScript node object for a given NodeId or Bac...
Resolves the JavaScript node object for a given NodeId or BackendNodeId. This method provides the opposite functionality of requestNode - instead of getting a CDP node from a JavaScript object, it gets a JavaScript object from a CDP node. This enables executing JavaScript operations on...
resolve_node
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def scroll_into_view_if_needed( node_id: Optional[int] = None, backend_node_id: Optional[int] = None, object_id: Optional[str] = None, rect: Optional[Rect] = None, ) -> Command[Response]: """ Scrolls the specified node into view if not already visible. This c...
Scrolls the specified node into view if not already visible. This command is crucial for reliable web automation, as it ensures elements are actually visible in the viewport before attempting interactions. Modern websites often use lazy loading and have long scrollable areas, making th...
scroll_into_view_if_needed
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def set_attributes_as_text( node_id: int, text: str, name: Optional[str] = None, ) -> Command[Response]: """ Sets attribute for an element with given id, using text representation. This command allows for more complex attribute manipulation than set_attribute_value, ...
Sets attribute for an element with given id, using text representation. This command allows for more complex attribute manipulation than set_attribute_value, as it accepts a text representation that can potentially define multiple attributes or include special formatting. It's particul...
set_attributes_as_text
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def set_attribute_value( node_id: int, name: str, value: str, ) -> Command[Response]: """ Sets attribute for element with given id. This command provides direct control over element attributes without using JavaScript, which is essential for testing how appli...
Sets attribute for element with given id. This command provides direct control over element attributes without using JavaScript, which is essential for testing how applications respond to attribute changes or for setting up specific test conditions by controlling element attributes dir...
set_attribute_value
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def set_file_input_files( files: list[str], node_id: Optional[int] = None, backend_node_id: Optional[int] = None, object_id: Optional[str] = None, ) -> Command[Response]: """ Sets files for the given file input element. This command solves one of the most cha...
Sets files for the given file input element. This command solves one of the most challenging automation problems: working with file inputs. It bypasses the OS-level file dialog that normally appears when clicking a file input, allowing automated tests to provide files programmatically....
set_file_input_files
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def set_node_name( node_id: int, name: str, ) -> Command[SetNodeNameResponse]: """ Sets node name for a node with given id. This command allows changing the actual tag name of an element, which can be useful for testing how applications handle different types of elem...
Sets node name for a node with given id. This command allows changing the actual tag name of an element, which can be useful for testing how applications handle different types of elements or for testing the impact of semantic HTML choices on accessibility and behavior. Args: ...
set_node_name
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def set_node_value( node_id: int, value: str, ) -> Command[Response]: """ Sets node value for a node with given id. This command is particularly useful for updating the content of text nodes and comments, allowing direct manipulation of text content without changing ...
Sets node value for a node with given id. This command is particularly useful for updating the content of text nodes and comments, allowing direct manipulation of text content without changing the surrounding HTML structure. Args: node_id: Id of the node to set val...
set_node_value
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def set_outer_html( node_id: int, outer_html: str, ) -> Command[Response]: """ Sets node HTML markup, replacing existing one. This is one of the most powerful DOM manipulation commands, as it allows completely replacing an element and all its children with new HTML. ...
Sets node HTML markup, replacing existing one. This is one of the most powerful DOM manipulation commands, as it allows completely replacing an element and all its children with new HTML. This is useful for making major structural changes to the page or for testing how applications han...
set_outer_html
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def collect_class_names_from_subtree( node_id: int, ) -> Command[CollectClassNamesFromSubtreeResponse]: """ Collects class names for the node with given id and all of its children. This method is valuable for understanding the styling landscape of a page, especially in compl...
Collects class names for the node with given id and all of its children. This method is valuable for understanding the styling landscape of a page, especially in complex applications where multiple CSS frameworks might be in use or where classes are dynamically applied. Args: ...
collect_class_names_from_subtree
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def copy_to( node_id: int, target_node_id: int, insert_before_node_id: Optional[int] = None, ) -> Command[CopyToResponse]: """ Creates a deep copy of the specified node and places it into the target container. Unlike move_to, this command creates a copy of the node, ...
Creates a deep copy of the specified node and places it into the target container. Unlike move_to, this command creates a copy of the node, leaving the original intact. This is useful when you want to duplicate content rather than move it, such as when testing how multiple instances of...
copy_to
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def discard_search_results( search_id: str, ) -> Command[Response]: """ Discards search results from the session with the given id. This method helps manage resources when performing multiple searches during a session, allowing explicit cleanup of search results that are no ...
Discards search results from the session with the given id. This method helps manage resources when performing multiple searches during a session, allowing explicit cleanup of search results that are no longer needed. Args: search_id: Unique search session identifier. ...
discard_search_results
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_anchor_element( node_id: int, anchor_specifier: Optional[str] = None, ) -> Command[GetAnchorElementResponse]: """ Finds the closest ancestor node that is an anchor element for the given node. This method is useful when working with content inside links or when you ne...
Finds the closest ancestor node that is an anchor element for the given node. This method is useful when working with content inside links or when you need to find the enclosing link element for text or other elements. This helps in cases where you might locate text but need to find th...
get_anchor_element
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_container_for_node( node_id: int, container_name: Optional[str] = None, physical_axes: Optional[PhysicalAxes] = None, logical_axes: Optional[LogicalAxes] = None, queries_scroll_state: Optional[bool] = None, ) -> Command[GetContainerForNodeResponse]: """ ...
Finds a containing element for the given node based on specified parameters. This method helps in understanding the structural and layout context of elements, particularly in complex layouts using CSS features like flexbox, grid, or when dealing with scrollable containers. Arg...
get_container_for_node
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_content_quads( node_id: Optional[int] = None, backend_node_id: Optional[int] = None, object_id: Optional[str] = None, ) -> Command[GetContentQuadsResponse]: """ Returns quads that describe node position on the page. This method provides detailed geometric inf...
Returns quads that describe node position on the page. This method provides detailed geometric information about an element's position on the page, accounting for any transformations, rotations, or other CSS effects. This is more precise than getBoxModel for complex layouts. A...
get_content_quads
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_element_by_relation( node_id: int, relation: ElementRelation, ) -> Command[GetElementByRelationResponse]: """ Retrieves an element related to the given one in a specified way. This method provides a way to find elements based on their relationships to other e...
Retrieves an element related to the given one in a specified way. This method provides a way to find elements based on their relationships to other elements, such as finding the next focusable element after a given one. This is useful for simulating keyboard navigation or for analyzing...
get_element_by_relation
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_file_info( object_id: str, ) -> Command[GetFileInfoResponse]: """ Returns file information for the given File object. This method is useful when working with file inputs and the File API, providing access to file metadata like name, size, and MIME type for files sele...
Returns file information for the given File object. This method is useful when working with file inputs and the File API, providing access to file metadata like name, size, and MIME type for files selected in file input elements or created programmatically. Args: o...
get_file_info
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_frame_owner( frame_id: str, ) -> Command[GetFrameOwnerResponse]: """ Returns iframe element that owns the given frame. This method is essential when working with pages that contain iframes, as it allows mapping between frame IDs (used in CDP) and the actual iframe el...
Returns iframe element that owns the given frame. This method is essential when working with pages that contain iframes, as it allows mapping between frame IDs (used in CDP) and the actual iframe elements in the parent document. Args: frame_id: Id of the frame to g...
get_frame_owner
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_nodes_for_subtree_by_style( node_id: int, computed_styles: list[CSSComputedStyleProperty], pierce: Optional[bool] = None, ) -> Command[GetNodesForSubtreeByStyleResponse]: """ Finds nodes with a given computed style in a subtree. This method allows finding ele...
Finds nodes with a given computed style in a subtree. This method allows finding elements based on their computed styles rather than just structure or attributes. This is powerful for testing visual aspects of a page or for finding elements that match specific visual criteria. ...
get_nodes_for_subtree_by_style
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_node_stack_traces( node_id: int, ) -> Command[GetNodeStackTracesResponse]: """ Gets stack traces associated with a specific node. This method is powerful for debugging, as it reveals the JavaScript execution paths that led to the creation of specific DOM elements, he...
Gets stack traces associated with a specific node. This method is powerful for debugging, as it reveals the JavaScript execution paths that led to the creation of specific DOM elements, helping developers understand the relationship between their code and the resulting DOM structure. ...
get_node_stack_traces
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_querying_descendants_for_container( node_id: int, ) -> Command[GetQueryingDescendantForContainerResponse]: """ Returns the querying descendants for container. This method is particularly useful for working with CSS Container Queries, helping to identify which descend...
Returns the querying descendants for container. This method is particularly useful for working with CSS Container Queries, helping to identify which descendant elements are affected by or querying a particular container element. Args: node_id: Id of the container n...
get_querying_descendants_for_container
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_relayout_boundary( node_id: int, ) -> Command[GetRelayoutBoundaryResponse]: """ Returns the root of the relayout boundary for the given node. This method helps in understanding layout performance by identifying the boundary of layout recalculations when a particular ...
Returns the root of the relayout boundary for the given node. This method helps in understanding layout performance by identifying the boundary of layout recalculations when a particular element changes. This is valuable for optimizing rendering performance. Args: ...
get_relayout_boundary
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def get_search_results( search_id: str, from_index: int, to_index: int, ) -> Command[GetSearchResultsResponse]: """ Returns search results from given `fromIndex` to given `toIndex` from a search. This method is used in conjunction with performSearch to retrieve searc...
Returns search results from given `fromIndex` to given `toIndex` from a search. This method is used in conjunction with performSearch to retrieve search results in batches, which is essential when dealing with large result sets that might be inefficient to transfer all at once. ...
get_search_results
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def perform_search( query: str, include_user_agent_shadow_dom: Optional[bool] = None, ) -> Command[PerformSearchResponse]: """ Searches for a given string in the DOM tree. This method initiates a search across the DOM tree, supporting plain text, CSS selectors, or XP...
Searches for a given string in the DOM tree. This method initiates a search across the DOM tree, supporting plain text, CSS selectors, or XPath expressions. It's a powerful way to find elements or content across the entire document without knowing the exact structure. Args: ...
perform_search
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def push_node_by_path_to_frontend( path: str, ) -> Command[PushNodeByPathToFrontendResponse]: """ Requests that the node is sent to the caller given its path. This method provides an alternative way to reference nodes when node IDs aren't available, using path expressions in...
Requests that the node is sent to the caller given its path. This method provides an alternative way to reference nodes when node IDs aren't available, using path expressions instead. This can be useful when integrating with systems that identify elements by path rather than by ID. ...
push_node_by_path_to_frontend
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def push_nodes_by_backend_ids_to_frontend( backend_node_ids: list[int], ) -> Command[PushNodesByBackendIdsToFrontendResponse]: """ Requests that a batch of nodes is sent to the caller given their backend node ids. This method allows for efficient batch processing when you have multi...
Requests that a batch of nodes is sent to the caller given their backend node ids. This method allows for efficient batch processing when you have multiple backend node IDs and need to convert them to frontend node IDs for further operations. Args: backend_node_ids: The ar...
push_nodes_by_backend_ids_to_frontend
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def set_inspected_node( node_id: int, ) -> Command[Response]: """ Enables console to refer to the node with given id via $x command line API. This method creates a bridge between automated testing/scripting and manual console interaction, making it easy to reference specific...
Enables console to refer to the node with given id via $x command line API. This method creates a bridge between automated testing/scripting and manual console interaction, making it easy to reference specific nodes in the console for debugging or experimentation. Args: ...
set_inspected_node
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def set_node_stack_traces_enabled( enable: bool, ) -> Command[Response]: """ Sets if stack traces should be captured for Nodes. This method enables or disables the collection of stack traces when DOM nodes are created, which can be extremely valuable for debugging complex ap...
Sets if stack traces should be captured for Nodes. This method enables or disables the collection of stack traces when DOM nodes are created, which can be extremely valuable for debugging complex applications to understand where and why specific DOM elements are being created. ...
set_node_stack_traces_enabled
python
autoscrape-labs/pydoll
pydoll/commands/dom_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/dom_commands.py
MIT
def continue_request( # noqa: PLR0913, PLR0917 request_id: str, url: Optional[str] = None, method: Optional[RequestMethod] = None, post_data: Optional[str] = None, headers: Optional[list[HeaderEntry]] = None, intercept_response: Optional[bool] = None, ) -> Command[Re...
Creates a command to continue a paused fetch request. This command allows the browser to resume a fetch operation that has been intercepted. You can modify the fetch request URL, method, headers, and body before continuing. Args: request_id (str): The ID of the fet...
continue_request
python
autoscrape-labs/pydoll
pydoll/commands/fetch_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/fetch_commands.py
MIT
def continue_request_with_auth( request_id: str, auth_challenge_response: AuthChallengeResponseValues, proxy_username: Optional[str] = None, proxy_password: Optional[str] = None, ) -> Command[Response]: """ Creates a command to continue a paused fetch request with ...
Creates a command to continue a paused fetch request with authentication. This command is used when the fetch operation requires authentication. It provides the necessary credentials to continue the request. Args: request_id (str): The ID of the fetch request to co...
continue_request_with_auth
python
autoscrape-labs/pydoll
pydoll/commands/fetch_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/fetch_commands.py
MIT
def enable( handle_auth_requests: bool, url_pattern: str = '*', resource_type: Optional[ResourceType] = None, request_stage: Optional[RequestStage] = None, ) -> Command[Response]: """ Creates a command to enable fetch interception. This command allows the bro...
Creates a command to enable fetch interception. This command allows the browser to start intercepting fetch requests. You can specify whether to handle authentication challenges and the types of resources to intercept. Args: handle_auth_requests (bool): Indicates i...
enable
python
autoscrape-labs/pydoll
pydoll/commands/fetch_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/fetch_commands.py
MIT
def fail_request(request_id: str, error_reason: NetworkErrorReason) -> Command[Response]: """ Creates a command to simulate a failure in a fetch request. This command allows you to simulate a failure for a specific fetch operation, providing a reason for the failure. Args: ...
Creates a command to simulate a failure in a fetch request. This command allows you to simulate a failure for a specific fetch operation, providing a reason for the failure. Args: request_id (str): The ID of the fetch request to fail. error_reason (NetworkError...
fail_request
python
autoscrape-labs/pydoll
pydoll/commands/fetch_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/fetch_commands.py
MIT
def fulfill_request( # noqa: PLR0913, PLR0917 request_id: str, response_code: int, response_headers: Optional[list[HeaderEntry]] = None, body: Optional[dict] = None, response_phrase: Optional[str] = None, ) -> Command[Response]: """ Creates a command to fulfi...
Creates a command to fulfill a fetch request with a custom response. This command allows you to provide a custom response for a fetch operation, including the HTTP status code, headers, and body content. Args: request_id (str): The ID of the fetch request to fulfill. ...
fulfill_request
python
autoscrape-labs/pydoll
pydoll/commands/fetch_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/fetch_commands.py
MIT
def get_response_body(request_id: str) -> Command[GetResponseBodyResponse]: """ Creates a command to retrieve the response body of a fetch request. This command allows you to access the body of a completed fetch operation, which can be useful for analyzing the response data. Ar...
Creates a command to retrieve the response body of a fetch request. This command allows you to access the body of a completed fetch operation, which can be useful for analyzing the response data. Args: request_id (str): The ID of the fetch request to retrieve the body ...
get_response_body
python
autoscrape-labs/pydoll
pydoll/commands/fetch_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/fetch_commands.py
MIT
def continue_response( request_id: str, response_code: Optional[int] = None, response_headers: Optional[list[HeaderEntry]] = None, response_phrase: Optional[str] = None, ) -> Command[Response]: """ Creates a command to continue a fetch response for an intercepted ...
Creates a command to continue a fetch response for an intercepted request. This command allows the browser to continue the response flow for a specific fetch request, including customizing the HTTP status code, headers, and response phrase. Args: request_id...
continue_response
python
autoscrape-labs/pydoll
pydoll/commands/fetch_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/fetch_commands.py
MIT
def take_response_body_as_stream( request_id: str, ) -> Command[TakeResponseBodyAsStreamResponse]: """ Creates a command to take the response body as a stream. This command allows you to receive the response body as a stream which can be useful for handling large responses. ...
Creates a command to take the response body as a stream. This command allows you to receive the response body as a stream which can be useful for handling large responses. Args: request_id (str): The ID of the fetch request to take the response body stream ...
take_response_body_as_stream
python
autoscrape-labs/pydoll
pydoll/commands/fetch_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/fetch_commands.py
MIT
def dispatch_key_event( # noqa: PLR0913, PLR0917, PLR0912 type: KeyEventType, modifiers: Optional[KeyModifier] = None, timestamp: Optional[float] = None, text: Optional[str] = None, unmodified_text: Optional[str] = None, key_identifier: Optional[str] = None, code...
Generates a command to dispatch a key event to the page. This method can simulate various types of keyboard events such as key presses, key releases, and character inputs. Args: type: Type of the key event. Allowed values: keyDown, keyUp, rawKeyDown, char. ...
dispatch_key_event
python
autoscrape-labs/pydoll
pydoll/commands/input_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/input_commands.py
MIT
def dispatch_mouse_event( # noqa: PLR0913, PLR0917 type: MouseEventType, x: int, y: int, modifiers: Optional[KeyModifier] = None, timestamp: Optional[float] = None, button: Optional[MouseButton] = None, click_count: Optional[int] = None, force: Optional[f...
Generates a command to dispatch a mouse event to the page. This method allows simulating various mouse interactions such as clicks, movements, and wheel scrolling. Args: type: Type of the mouse event. Allowed values: - mousePressed: Mouse button pressed ...
dispatch_mouse_event
python
autoscrape-labs/pydoll
pydoll/commands/input_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/input_commands.py
MIT
def dispatch_touch_event( type: TouchEventType, touch_points: Optional[list[TouchPoint]] = None, modifiers: Optional[KeyModifier] = None, timestamp: Optional[float] = None, ) -> Command[Response]: """ Generates a command to dispatch a touch event to the page. ...
Generates a command to dispatch a touch event to the page. This method allows simulating touch interactions on touch-enabled devices or emulated touch environments. Args: type: Type of the touch event. Allowed values: - touchStart: Touch started - at least...
dispatch_touch_event
python
autoscrape-labs/pydoll
pydoll/commands/input_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/input_commands.py
MIT
def set_ignore_input_events(enabled: bool) -> Command[Response]: """ Generates a command to ignore input events (useful while auditing page). When enabled, all input events will be ignored, which can be useful during automated tests or when you want to prevent user interaction w...
Generates a command to ignore input events (useful while auditing page). When enabled, all input events will be ignored, which can be useful during automated tests or when you want to prevent user interaction while performing certain operations. Args: enabled: If t...
set_ignore_input_events
python
autoscrape-labs/pydoll
pydoll/commands/input_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/input_commands.py
MIT
def dispatch_drag_event( type: DragEventType, x: int, y: int, data: Optional[DragData] = None, modifiers: Optional[KeyModifier] = None, ) -> Command[Response]: """ Generates a command to dispatch a drag event into the page. This experimental method al...
Generates a command to dispatch a drag event into the page. This experimental method allows simulating drag and drop operations by dispatching drag events at specific coordinates. Args: type: Type of the drag event. Allowed values: - dragEnter: Fired when ...
dispatch_drag_event
python
autoscrape-labs/pydoll
pydoll/commands/input_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/input_commands.py
MIT
def emulate_touch_from_mouse_event( # noqa: PLR0913, PLR0917 type: MouseEventType, x: int, y: int, button: MouseButton, timestamp: Optional[float] = None, delta_x: Optional[float] = None, delta_y: Optional[float] = None, modifiers: Optional[KeyModifier] =...
Generates a command to emulate touch event from the mouse event parameters. This experimental method allows converting mouse events into touch events, useful for testing touch interactions in environments where touch is not available. Args: type: Type of the mouse event to...
emulate_touch_from_mouse_event
python
autoscrape-labs/pydoll
pydoll/commands/input_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/input_commands.py
MIT
def insert_text( text: str, ) -> Command[Response]: """ Generates a command to emulate inserting text that doesn't come from a key press. This experimental method is useful for inserting text that would normally come from sources other than keyboard, such as emoji pickers, I...
Generates a command to emulate inserting text that doesn't come from a key press. This experimental method is useful for inserting text that would normally come from sources other than keyboard, such as emoji pickers, IMEs, or clipboard pastes. Args: text: The text...
insert_text
python
autoscrape-labs/pydoll
pydoll/commands/input_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/input_commands.py
MIT
def synthesize_pinch_gesture( x: int, y: int, scale_factor: float, relative_speed: Optional[float] = None, gesture_source_type: Optional[GestureSourceType] = None, ) -> Command[Response]: """ Generates a command to synthesize a pinch gesture over a time period...
Generates a command to synthesize a pinch gesture over a time period. This experimental method creates a synthetic pinch gesture (zoom in/out) by issuing appropriate touch events over time. This is useful for testing pinch-to-zoom functionality in web applications. Args: ...
synthesize_pinch_gesture
python
autoscrape-labs/pydoll
pydoll/commands/input_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/input_commands.py
MIT
def synthesize_scroll_gesture( # noqa: PLR0913, PLR0917 x: int, y: int, x_distance: Optional[float] = None, y_distance: Optional[float] = None, x_overscroll: Optional[float] = None, y_overscroll: Optional[float] = None, prevent_fling: Optional[bool] = None, ...
Generates a command to synthesize a scroll gesture over a time period. This experimental method creates a synthetic scroll gesture by issuing appropriate touch events over time. This is useful for testing scrolling behavior in web applications. Args: x: X coordinat...
synthesize_scroll_gesture
python
autoscrape-labs/pydoll
pydoll/commands/input_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/input_commands.py
MIT
def synthesize_tap_gesture( x: int, y: int, duration: Optional[int] = None, tap_count: Optional[int] = None, gesture_source_type: Optional[GestureSourceType] = None, ) -> Command[Response]: """ Generates a command to synthesize a tap gesture over a time period...
Generates a command to synthesize a tap gesture over a time period. This experimental method creates a synthetic tap gesture by issuing appropriate touch events over time. This is useful for testing touch interaction in web applications. Args: x: X coordinate of th...
synthesize_tap_gesture
python
autoscrape-labs/pydoll
pydoll/commands/input_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/input_commands.py
MIT
def delete_cookies( name: str, url: Optional[str] = None, domain: Optional[str] = None, path: Optional[str] = None, partition_key: Optional[CookiePartitionKey] = None, ) -> Command[Response]: """ Deletes browser cookies with matching criteria. Provide...
Deletes browser cookies with matching criteria. Provides granular control over cookie removal through multiple parameters: - Delete by name only (affects all matching cookies) - Scope deletion using URL, domain, or path - Handle partitioned cookies for privacy-aware application...
delete_cookies
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def get_cookies( urls: Optional[list[str]] = None, ) -> Command[GetCookiesResponse]: """ Retrieves cookies matching specified URLs. Args: urls: list of URLs to scope cookie retrieval Returns: Command: CDP command returning cookie details including: ...
Retrieves cookies matching specified URLs. Args: urls: list of URLs to scope cookie retrieval Returns: Command: CDP command returning cookie details including: - Name, value, and attributes - Security and scope parameters ...
get_cookies
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def get_request_post_data( request_id: str, ) -> Command[GetRequestPostDataResponse]: """ Retrieves POST data from a specific network request. Essential for: - Form submission analysis - API request debugging - File upload monitoring - Security testin...
Retrieves POST data from a specific network request. Essential for: - Form submission analysis - API request debugging - File upload monitoring - Security testing Args: request_id: Unique identifier for the network request Returns: ...
get_request_post_data
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def get_response_body(request_id: str) -> Command[GetResponseBodyResponse]: """ Retrieves the full content of a network response. Supports various content types: - Text-based resources (HTML, CSS, JSON) - Base64-encoded binary content (images, media) - Gzip/deflate compr...
Retrieves the full content of a network response. Supports various content types: - Text-based resources (HTML, CSS, JSON) - Base64-encoded binary content (images, media) - Gzip/deflate compressed responses Args: request_id: Unique network request identifie...
get_response_body
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def set_cache_disabled(cache_disabled: bool) -> Command[Response]: """ Controls browser's cache mechanism. Use cases: - Testing resource update behavior - Forcing fresh content loading - Performance impact analysis - Cache-busting scenarios Args: ...
Controls browser's cache mechanism. Use cases: - Testing resource update behavior - Forcing fresh content loading - Performance impact analysis - Cache-busting scenarios Args: cache_disabled: True to disable caching, False to enable Returns...
set_cache_disabled
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def set_cookie( # noqa: PLR0913, PLR0917 name: str, value: str, url: Optional[str] = None, domain: Optional[str] = None, path: Optional[str] = None, secure: Optional[bool] = None, http_only: Optional[bool] = None, same_site: Optional[CookieSameSite] = Non...
Creates or updates a cookie with specified attributes. Comprehensive cookie control supporting: - Session and persistent cookies - Security attributes (Secure, HttpOnly) - SameSite policies - Cookie partitioning - Priority levels Args: name:...
set_cookie
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def set_cookies(cookies: list[SetCookieParams]) -> Command[Response]: """ Sets multiple cookies in a single operation. Efficient for: - Batch cookie operations - Session state restoration - Testing multiple authentication states - Cross-domain cookie setup ...
Sets multiple cookies in a single operation. Efficient for: - Batch cookie operations - Session state restoration - Testing multiple authentication states - Cross-domain cookie setup Args: cookies: list of cookie parameters including ...
set_cookies
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def set_extra_http_headers( headers: list[HeaderEntry], ) -> Command[Response]: """ Applies custom HTTP headers to all subsequent requests. Enables advanced scenarios: - A/B testing with custom headers - Authentication bypass for testing - Content negotiation...
Applies custom HTTP headers to all subsequent requests. Enables advanced scenarios: - A/B testing with custom headers - Authentication bypass for testing - Content negotiation simulations - Security header validation Args: headers: list of key-value...
set_extra_http_headers
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def set_useragent_override( user_agent: str, accept_language: Optional[str] = None, platform: Optional[str] = None, user_agent_metadata: Optional[UserAgentMetadata] = None, ) -> Command[Response]: """ Overrides the browser's User-Agent string. Use cases: ...
Overrides the browser's User-Agent string. Use cases: - Device/browser simulation - Compatibility testing - Content negotiation - Bot detection bypass Args: user_agent: Complete User-Agent string accept_language: Language preference head...
set_useragent_override
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def enable_reporting_api( enabled: bool, ) -> Command[Response]: """ Controls the Reporting API functionality. Features: - Network error reporting - Deprecation notices - CSP violation reports - CORS issues Args: enabled: True to ...
Controls the Reporting API functionality. Features: - Network error reporting - Deprecation notices - CSP violation reports - CORS issues Args: enabled: True to enable, False to disable Returns: Command: CDP command to configure...
enable_reporting_api
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def search_in_response_body( request_id: str, query: str, case_sensitive: bool = False, is_regex: bool = False, ) -> Command[SearchInResponseBodyResponse]: """ Searches for content within response bodies. Powerful for: - Content verification -...
Searches for content within response bodies. Powerful for: - Content verification - Security scanning - Data extraction - Response validation Args: request_id: Target response identifier query: Search string or pattern case_s...
search_in_response_body
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def set_blocked_urls(urls: list[str]) -> Command[Response]: """ Blocks specified URLs from loading. Key features: - Pattern-based URL blocking - Resource type filtering - Network request prevention - Error simulation Args: urls: list of URL p...
Blocks specified URLs from loading. Key features: - Pattern-based URL blocking - Resource type filtering - Network request prevention - Error simulation Args: urls: list of URL patterns to block Supports wildcards and pattern matchi...
set_blocked_urls
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def set_bypass_service_worker(bypass: bool) -> Command[Response]: """ Controls Service Worker interception of network requests. Use cases: - Testing direct network behavior - Bypassing offline functionality - Debug caching issues - Performance comparison ...
Controls Service Worker interception of network requests. Use cases: - Testing direct network behavior - Bypassing offline functionality - Debug caching issues - Performance comparison Args: bypass: True to skip Service Worker, False to allow ...
set_bypass_service_worker
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def get_certificate(origin: str) -> Command[GetCertificateResponse]: """ Retrieves SSL/TLS certificate information for a domain. Provides: - Certificate chain details - Validation status - Expiration information - Issuer details Args: origin:...
Retrieves SSL/TLS certificate information for a domain. Provides: - Certificate chain details - Validation status - Expiration information - Issuer details Args: origin: Target domain for certificate inspection Returns: Command:...
get_certificate
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def get_response_body_for_interception( interception_id: str, ) -> Command[GetResponseBodyForInterceptionResponse]: """ Retrieves response body from an intercepted request. Essential for: - Response modification - Content inspection - Security testing ...
Retrieves response body from an intercepted request. Essential for: - Response modification - Content inspection - Security testing - API response validation Args: interception_id: Identifier for intercepted request Returns: Com...
get_response_body_for_interception
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def set_accepted_encodings( encodings: list[ContentEncoding], ) -> Command[Response]: """ Specifies accepted content encodings for requests. Controls: - Compression algorithms - Transfer encoding - Content optimization Args: encodings: li...
Specifies accepted content encodings for requests. Controls: - Compression algorithms - Transfer encoding - Content optimization Args: encodings: list of accepted encoding methods (gzip, deflate, br, etc.) Returns: ...
set_accepted_encodings
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def set_attach_debug_stack(enabled: bool) -> Command[Response]: """ Enables/disables debug stack attachment to requests. Debug features: - Stack trace collection - Request origin tracking - Initialization context - Call site identification Args: ...
Enables/disables debug stack attachment to requests. Debug features: - Stack trace collection - Request origin tracking - Initialization context - Call site identification Args: enabled: True to attach debug info, False to disable Returns: ...
set_attach_debug_stack
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def set_cookie_controls( enable_third_party_cookie_restriction: bool, disable_third_party_cookie_metadata: Optional[bool] = None, disable_third_party_cookie_heuristics: Optional[bool] = None, ) -> Command[Response]: """ Configures third-party cookie handling policies. ...
Configures third-party cookie handling policies. Privacy features: - Cookie access control - Third-party restrictions - Tracking prevention - Privacy policy enforcement Args: enable_third_party_cookie_restriction: Enable restrictions dis...
set_cookie_controls
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def stream_resource_content( request_id: str, ) -> Command[StreamResourceContentResponse]: """ Enables streaming of response content. Useful for: - Large file downloads - Progressive loading - Memory optimization - Real-time processing Args: ...
Enables streaming of response content. Useful for: - Large file downloads - Progressive loading - Memory optimization - Real-time processing Args: request_id: Target request identifier Returns: Command: CDP command to initiate c...
stream_resource_content
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def take_response_body_for_interception_as_stream( interception_id: str, ) -> Command[TakeResponseBodyForInterceptionAsStreamResponse]: """ Creates a stream for intercepted response body. Applications: - Large response handling - Content modification - Bandwi...
Creates a stream for intercepted response body. Applications: - Large response handling - Content modification - Bandwidth optimization - Progressive processing Args: interception_id: Intercepted response identifier Returns: Com...
take_response_body_for_interception_as_stream
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def emulate_network_conditions( # noqa: PLR0913, PLR0917 offline: bool, latency: float, download_throughput: float, upload_throughput: float, connection_type: Optional[ConnectionType] = None, packet_loss: Optional[float] = None, packet_queue_length: Optional[int]...
Emulates custom network conditions for realistic testing scenarios. Simulates various network profiles including: - Offline mode - High-latency connections - Bandwidth throttling - Unreliable network characteristics Args: offline: Simulate complete ...
emulate_network_conditions
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def get_security_isolation_status( frame_id: Optional[str] = None, ) -> Command[GetSecurityIsolationStatusResponse]: """ Retrieves security isolation information. Provides: - CORS status - Cross-origin isolation - Security context - Frame isolation ...
Retrieves security isolation information. Provides: - CORS status - Cross-origin isolation - Security context - Frame isolation Args: frame_id: Optional frame to check Returns: Command: CDP command returning isolation status ...
get_security_isolation_status
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def load_network_resource( url: str, options: LoadNetworkResourceOptions, frame_id: Optional[str] = None, ) -> Command[LoadNetworkResourceResponse]: """ Loads a network resource with specific options. Features: - Custom request configuration - Resourc...
Loads a network resource with specific options. Features: - Custom request configuration - Resource loading control - Frame-specific loading - Error handling Args: url: Resource URL to load options: Loading configuration fram...
load_network_resource
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def replay_xhr( request_id: str, ) -> Command[Response]: """ Replays an XHR request. Applications: - Request debugging - Response testing - Race condition analysis - API verification Args: request_id: XHR request to replay ...
Replays an XHR request. Applications: - Request debugging - Response testing - Race condition analysis - API verification Args: request_id: XHR request to replay Returns: Command: CDP command to replay XHR Note: ...
replay_xhr
python
autoscrape-labs/pydoll
pydoll/commands/network_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/network_commands.py
MIT
def add_script_to_evaluate_on_new_document( source: str, world_name: Optional[str] = None, include_command_line_api: Optional[bool] = None, run_immediately: Optional[bool] = None, ) -> Command[AddScriptToEvaluateOnNewDocumentResponse]: """ Creates a command to add a s...
Creates a command to add a script that will be evaluated when a new document is created. Args: source (str): Script source to be evaluated when a new document is created. world_name (Optional[str]): If specified, creates an isolated world with the given name. includ...
add_script_to_evaluate_on_new_document
python
autoscrape-labs/pydoll
pydoll/commands/page_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py
MIT
def capture_screenshot( # noqa: PLR0913, PLR0917 format: Optional[ScreenshotFormat] = None, quality: Optional[int] = None, clip: Optional[Viewport] = None, from_surface: Optional[bool] = None, capture_beyond_viewport: Optional[bool] = None, optimize_for_speed: Optional[b...
Creates a command to capture a screenshot of the current page. Args: format (Optional[str]): Image compression format (jpeg, png, or webp). quality (Optional[int]): Compression quality from 0-100 (jpeg only). clip (Optional[Viewport]): Region of the page to capture....
capture_screenshot
python
autoscrape-labs/pydoll
pydoll/commands/page_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py
MIT
def create_isolated_world( frame_id: str, world_name: Optional[str] = None, grant_universal_access: Optional[bool] = None, ) -> Command[CreateIsolatedWorldResponse]: """ Creates a command to create an isolated world for the given frame. Args: frame_id (st...
Creates a command to create an isolated world for the given frame. Args: frame_id (str): ID of the frame in which to create the isolated world. world_name (Optional[str]): Name to be reported in the Execution Context. grant_universal_access (Optional[bool]): Whether...
create_isolated_world
python
autoscrape-labs/pydoll
pydoll/commands/page_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py
MIT
def get_app_manifest( manifest_id: Optional[str] = None, ) -> Command[GetAppManifestResponse]: """ Creates a command to get the manifest for the current document. Returns: Command[GetAppManifestResponse]: Command object with manifest information. """ para...
Creates a command to get the manifest for the current document. Returns: Command[GetAppManifestResponse]: Command object with manifest information.
get_app_manifest
python
autoscrape-labs/pydoll
pydoll/commands/page_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py
MIT
def handle_javascript_dialog( accept: bool, prompt_text: Optional[str] = None ) -> Command[Response]: """ Creates a command to handle a JavaScript dialog. Args: accept (bool): Whether to accept or dismiss the dialog. prompt_text (Optional[str]): Text to enter...
Creates a command to handle a JavaScript dialog. Args: accept (bool): Whether to accept or dismiss the dialog. prompt_text (Optional[str]): Text to enter in prompt dialogs. Returns: Command[Response]: Command object to handle a JavaScript dialog.
handle_javascript_dialog
python
autoscrape-labs/pydoll
pydoll/commands/page_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py
MIT
def navigate( url: str, referrer: Optional[str] = None, transition_type: Optional[TransitionType] = None, frame_id: Optional[str] = None, referrer_policy: Optional[ReferrerPolicy] = None, ) -> Command[NavigateResponse]: """ Creates a command to navigate to a s...
Creates a command to navigate to a specific URL. Args: url (str): URL to navigate to. referrer (Optional[str]): Referrer URL. transition_type (Optional[str]): Intended transition type. frame_id (Optional[str]): Frame ID to navigate. referrer_...
navigate
python
autoscrape-labs/pydoll
pydoll/commands/page_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py
MIT
def navigate_to_history_entry(entry_id: int) -> Command[Response]: """ Creates a command to navigate to a specific history entry. Args: entry_id (int): ID of the history entry to navigate to. Returns: Command[Response]: Command object to navigate to a history en...
Creates a command to navigate to a specific history entry. Args: entry_id (int): ID of the history entry to navigate to. Returns: Command[Response]: Command object to navigate to a history entry.
navigate_to_history_entry
python
autoscrape-labs/pydoll
pydoll/commands/page_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py
MIT
def print_to_pdf( # noqa: PLR0912, PLR0917, PLR0913 landscape: Optional[bool] = None, display_header_footer: Optional[bool] = None, print_background: Optional[bool] = None, scale: Optional[float] = None, paper_width: Optional[float] = None, paper_height: Optional[float] ...
Creates a command to print the current page to PDF. Args: landscape (Optional[bool]): Paper orientation. display_header_footer (Optional[bool]): Display header and footer. print_background (Optional[bool]): Print background graphics. scale (Optional[floa...
print_to_pdf
python
autoscrape-labs/pydoll
pydoll/commands/page_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py
MIT
def reload( ignore_cache: Optional[bool] = None, script_to_evaluate_on_load: Optional[str] = None, loader_id: Optional[str] = None, ) -> Command[Response]: """ Creates a command to reload the current page. Args: ignore_cache (Optional[bool]): If true, bro...
Creates a command to reload the current page. Args: ignore_cache (Optional[bool]): If true, browser cache is ignored. script_to_evaluate_on_load (Optional[str]): Script to be injected into the page on load. Returns: Command[Response]: Command object to relo...
reload
python
autoscrape-labs/pydoll
pydoll/commands/page_commands.py
https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py
MIT