You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cdp/browser.py
+2-5Lines changed: 2 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -302,9 +302,7 @@ def get_histograms(
302
302
'''
303
303
Get Chrome histograms.
304
304
305
-
:param query: Requested substring in name. Only histograms which have query as a
306
-
substring in their name are extracted. An empty or absent query returns
307
-
all histograms.
305
+
:param query: Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms.
308
306
:param delta: If true, retrieve delta since last call.
309
307
:returns: Histograms.
310
308
'''
@@ -398,8 +396,7 @@ def set_window_bounds(
398
396
Set position and/or size of the browser window.
399
397
400
398
:param window_id: Browser window id.
401
-
:param bounds: New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined
402
-
with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
399
+
:param bounds: New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
Copy file name to clipboardExpand all lines: cdp/debugger.py
+13-26Lines changed: 13 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -297,8 +297,7 @@ def enable(
297
297
Enables debugger for the given page. Clients should not assume that the debugging has been
298
298
enabled until the result for this command is received.
299
299
300
-
:param max_scripts_cache_size: The maximum size in bytes of collected scripts (not referenced by other heap objects)
301
-
the debugger can hold. Puts no limit if paramter is omitted.
300
+
:param max_scripts_cache_size: The maximum size in bytes of collected scripts (not referenced by other heap objects) the debugger can hold. Puts no limit if paramter is omitted.
302
301
:returns: Unique identifier of the debugger.
303
302
'''
304
303
params: T_JSON_DICT=dict()
@@ -328,12 +327,9 @@ def evaluate_on_call_frame(
328
327
329
328
:param call_frame_id: Call frame identifier to evaluate on.
330
329
:param expression: Expression to evaluate.
331
-
:param object_group: String object group name to put result into (allows rapid releasing resulting object handles
332
-
using ``releaseObjectGroup``).
333
-
:param include_command_line_api: Specifies whether command line API should be available to the evaluated expression, defaults
334
-
to false.
335
-
:param silent: In silent mode exceptions thrown during evaluation are not reported and do not pause
:param object_group: String object group name to put result into (allows rapid releasing resulting object handles using ``releaseObjectGroup``).
331
+
:param include_command_line_api: Specifies whether command line API should be available to the evaluated expression, defaults to false.
332
+
:param silent: In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides ``setPauseOnException`` state.
337
333
:param return_by_value: Whether the result is expected to be a JSON object that should be sent by value.
338
334
:param generate_preview: Whether preview should be generated for the result.
339
335
:param throw_on_side_effect: Whether to throw an exception if side effect cannot be ruled out during evaluation.
@@ -380,8 +376,7 @@ def get_possible_breakpoints(
380
376
the same.
381
377
382
378
:param start: Start of range to search possible breakpoint locations in.
383
-
:param end: End of range to search possible breakpoint locations in (excluding). When not specified, end
384
-
of scripts is used as end of range.
379
+
:param end: End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
385
380
:param restrict_to_function: Only consider locations which are in the same (non-nested) function as start.
386
381
:returns: List of the possible breakpoint locations.
:param max_depth: Maximum depth of async call stacks. Setting to ``0`` will effectively disable collecting async
555
-
call stacks (default).
549
+
:param max_depth: Maximum depth of async call stacks. Setting to ``0`` will effectively disable collecting async call stacks (default).
556
550
'''
557
551
params: T_JSON_DICT=dict()
558
552
params['maxDepth'] =max_depth
@@ -613,8 +607,7 @@ def set_breakpoint(
613
607
Sets JavaScript breakpoint at a given location.
614
608
615
609
:param location: Location to set breakpoint in.
616
-
:param condition: Expression to use as a breakpoint condition. When specified, debugger will only stop on the
617
-
breakpoint if this expression evaluates to true.
610
+
:param condition: Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
618
611
:returns: a tuple with the following items:
619
612
0. breakpointId: Id of the created breakpoint for further reference.
620
613
1. actualLocation: Location this breakpoint resolved into.
@@ -669,12 +662,10 @@ def set_breakpoint_by_url(
669
662
670
663
:param line_number: Line number to set breakpoint at.
671
664
:param url: URL of the resources to set breakpoint on.
672
-
:param url_regex: Regex pattern for the URLs of the resources to set breakpoints on. Either ``url`` or
673
-
``urlRegex`` must be specified.
665
+
:param url_regex: Regex pattern for the URLs of the resources to set breakpoints on. Either ``url`` or ``urlRegex`` must be specified.
674
666
:param script_hash: Script hash of the resources to set breakpoint on.
675
667
:param column_number: Offset in the line to set breakpoint at.
676
-
:param condition: Expression to use as a breakpoint condition. When specified, debugger will only stop on the
677
-
breakpoint if this expression evaluates to true.
668
+
:param condition: Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
678
669
:returns: a tuple with the following items:
679
670
0. breakpointId: Id of the created breakpoint for further reference.
680
671
1. locations: List of the locations this breakpoint resolved into upon addition.
:param condition: Expression to use as a breakpoint condition. When specified, debugger will
716
-
stop on the breakpoint if this expression evaluates to true.
706
+
:param condition: Expression to use as a breakpoint condition. When specified, debugger will stop on the breakpoint if this expression evaluates to true.
717
707
:returns: Id of the created breakpoint for further reference.
718
708
'''
719
709
params: T_JSON_DICT=dict()
@@ -790,8 +780,7 @@ def set_script_source(
790
780
791
781
:param script_id: Id of the script to edit.
792
782
:param script_source: New content of the script.
793
-
:param dry_run: If true the change will not actually be applied. Dry run may be used to get result
794
-
description without actually modifying the code.
783
+
:param dry_run: If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
795
784
:returns: a tuple with the following items:
796
785
0. callFrames: (Optional) New stack trace in case editing has happened while VM was stopped.
797
786
1. stackChanged: (Optional) Whether current call stack was modified after applying the changes.
@@ -845,8 +834,7 @@ def set_variable_value(
845
834
Changes value of variable in a callframe. Object-based scopes are not supported and must be
846
835
mutated manually.
847
836
848
-
:param scope_number: 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
849
-
scope types are allowed. Other scopes could be manipulated manually.
837
+
:param scope_number: 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
850
838
:param variable_name: Variable name.
851
839
:param new_value: New variable value.
852
840
:param call_frame_id: Id of callframe that holds variable.
@@ -869,8 +857,7 @@ def step_into(
869
857
'''
870
858
Steps into the function call.
871
859
872
-
:param break_on_async_call: Debugger will issue additional Debugger.paused notification if any async task is scheduled
873
-
before next pause.
860
+
:param break_on_async_call: Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.
Copy file name to clipboardExpand all lines: cdp/dom.py
+11-22Lines changed: 11 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -498,8 +498,7 @@ def copy_to(
498
498
499
499
:param node_id: Id of the node to copy.
500
500
:param target_node_id: Id of the element to drop the copy into.
501
-
:param insert_before_node_id: Drop the copy before this node (if absent, the copy becomes the last child of
502
-
``targetNodeId``).
501
+
:param insert_before_node_id: Drop the copy before this node (if absent, the copy becomes the last child of ``targetNodeId``).
503
502
:returns: Id of the node clone.
504
503
'''
505
504
params: T_JSON_DICT=dict()
@@ -529,10 +528,8 @@ def describe_node(
529
528
:param node_id: Identifier of the node.
530
529
:param backend_node_id: Identifier of the backend node.
531
530
:param object_id: JavaScript object id of the node wrapper.
532
-
:param depth: The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
533
-
entire subtree or provide an integer larger than 0.
534
-
:param pierce: Whether or not iframes and shadow roots should be traversed when returning the subtree
535
-
(default is false).
531
+
:param depth: The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
532
+
:param pierce: Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
536
533
:returns: Node description.
537
534
'''
538
535
params: T_JSON_DICT=dict()
@@ -701,10 +698,8 @@ def get_document(
701
698
'''
702
699
Returns the root DOM node (and optionally the subtree) to the caller.
703
700
704
-
:param depth: The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
705
-
entire subtree or provide an integer larger than 0.
706
-
:param pierce: Whether or not iframes and shadow roots should be traversed when returning the subtree
707
-
(default is false).
701
+
:param depth: The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
702
+
:param pierce: Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
708
703
:returns: Resulting node.
709
704
'''
710
705
params: T_JSON_DICT=dict()
@@ -727,10 +722,8 @@ def get_flattened_document(
727
722
'''
728
723
Returns the root DOM node (and optionally the subtree) to the caller.
729
724
730
-
:param depth: The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
731
-
entire subtree or provide an integer larger than 0.
732
-
:param pierce: Whether or not iframes and shadow roots should be traversed when returning the subtree
733
-
(default is false).
725
+
:param depth: The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
726
+
:param pierce: Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
734
727
:returns: Resulting node.
735
728
'''
736
729
params: T_JSON_DICT=dict()
@@ -901,8 +894,7 @@ def move_to(
901
894
902
895
:param node_id: Id of the node to move.
903
896
:param target_node_id: Id of the element to drop the moved node into.
904
-
:param insert_before_node_id: Drop node before this one (if absent, the moved node becomes the last child of
905
-
``targetNodeId``).
897
+
:param insert_before_node_id: Drop node before this one (if absent, the moved node becomes the last child of ``targetNodeId``).
906
898
:returns: New id of the moved node.
907
899
'''
908
900
params: T_JSON_DICT=dict()
@@ -1088,10 +1080,8 @@ def request_child_nodes(
1088
1080
the specified depth.
1089
1081
1090
1082
:param node_id: Id of the node to get children for.
1091
-
:param depth: The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
1092
-
entire subtree or provide an integer larger than 0.
1093
-
:param pierce: Whether or not iframes and shadow roots should be traversed when returning the sub-tree
1094
-
(default is false).
1083
+
:param depth: The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
1084
+
:param pierce: Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false).
1095
1085
'''
1096
1086
params: T_JSON_DICT=dict()
1097
1087
params['nodeId'] =node_id.to_json()
@@ -1193,8 +1183,7 @@ def set_attributes_as_text(
1193
1183
1194
1184
:param node_id: Id of the element to set attributes for.
1195
1185
:param text: Text with a number of attributes. Will parse this text using HTML parser.
1196
-
:param name: Attribute name to replace with new attributes derived from text in case text parsed
1197
-
successfully.
1186
+
:param name: Attribute name to replace with new attributes derived from text in case text parsed successfully.
Copy file name to clipboardExpand all lines: cdp/dom_debugger.py
+3-6Lines changed: 3 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -110,10 +110,8 @@ def get_event_listeners(
110
110
Returns event listeners of the given object.
111
111
112
112
:param object_id: Identifier of the object to return listeners for.
113
-
:param depth: The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the
114
-
entire subtree or provide an integer larger than 0.
115
-
:param pierce: Whether or not iframes and shadow roots should be traversed when returning the subtree
116
-
(default is false). Reports listeners for all contexts if pierce is enabled.
113
+
:param depth: The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
114
+
:param pierce: Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Reports listeners for all contexts if pierce is enabled.
0 commit comments