@@ -345,25 +345,23 @@ with SB(uc=True, test=True, locale_code="en", ad_block=True) as sb:
345
345
346
346
### 🐙 <b translate =" no " >CDP Mode</b > API / Methods
347
347
348
- (Some method args have been left out for simplicity. Eg: <code translate =" no " >timeout</code >)
349
-
350
348
``` python
351
349
sb.cdp.get(url)
352
350
sb.cdp.open(url)
353
351
sb.cdp.reload(ignore_cache = True , script_to_evaluate_on_load = None )
354
352
sb.cdp.refresh()
355
353
sb.cdp.get_event_loop()
356
354
sb.cdp.add_handler(event, handler)
357
- sb.cdp.find_element(selector)
358
- sb.cdp.find(selector)
359
- sb.cdp.locator(selector)
360
- sb.cdp.find_element_by_text(text, tag_name = None )
361
- sb.cdp.find_all(selector)
355
+ sb.cdp.find_element(selector, best_match = False , timeout = None )
356
+ sb.cdp.find(selector, best_match = False , timeout = None )
357
+ sb.cdp.locator(selector, best_match = False , timeout = None )
358
+ sb.cdp.find_element_by_text(text, tag_name = None , timeout = None )
359
+ sb.cdp.find_all(selector, timeout = None )
362
360
sb.cdp.find_elements_by_text(text, tag_name = None )
363
- sb.cdp.select(selector)
364
- sb.cdp.select_all(selector)
365
- sb.cdp.find_elements(selector)
366
- sb.cdp.find_visible_elements(selector)
361
+ sb.cdp.select(selector, timeout = None )
362
+ sb.cdp.select_all(selector, timeout = None )
363
+ sb.cdp.find_elements(selector, timeout = None )
364
+ sb.cdp.find_visible_elements(selector, timeout = None )
367
365
sb.cdp.click_nth_element(selector, number)
368
366
sb.cdp.click_nth_visible_element(selector, number)
369
367
sb.cdp.click_link(link_text)
@@ -375,17 +373,17 @@ sb.cdp.get_all_cookies(*args, **kwargs)
375
373
sb.cdp.set_all_cookies(* args, ** kwargs)
376
374
sb.cdp.save_cookies(* args, ** kwargs)
377
375
sb.cdp.load_cookies(* args, ** kwargs)
378
- sb.cdp.clear_cookies(* args, ** kwargs )
376
+ sb.cdp.clear_cookies()
379
377
sb.cdp.sleep(seconds)
380
378
sb.cdp.bring_active_window_to_front()
381
379
sb.cdp.bring_to_front()
382
380
sb.cdp.get_active_element()
383
381
sb.cdp.get_active_element_css()
384
- sb.cdp.click(selector)
382
+ sb.cdp.click(selector, timeout = None )
385
383
sb.cdp.click_active_element()
386
384
sb.cdp.click_if_visible(selector)
387
385
sb.cdp.click_visible_elements(selector, limit = 0 )
388
- sb.cdp.mouse_click(selector)
386
+ sb.cdp.mouse_click(selector, timeout = None )
389
387
sb.cdp.nested_click(parent_selector, selector)
390
388
sb.cdp.get_nested_element(parent_selector, selector)
391
389
sb.cdp.select_option_by_text(dropdown_selector, option)
@@ -396,10 +394,10 @@ sb.cdp.highlight_overlay(selector)
396
394
sb.cdp.remove_element(selector)
397
395
sb.cdp.remove_from_dom(selector)
398
396
sb.cdp.remove_elements(selector)
399
- sb.cdp.send_keys(selector, text)
400
- sb.cdp.press_keys(selector, text)
401
- sb.cdp.type(selector, text)
402
- sb.cdp.set_value(selector, text)
397
+ sb.cdp.send_keys(selector, text, timeout = None )
398
+ sb.cdp.press_keys(selector, text, timeout = None )
399
+ sb.cdp.type(selector, text, timeout = None )
400
+ sb.cdp.set_value(selector, text, timeout = None )
403
401
sb.cdp.evaluate(expression)
404
402
sb.cdp.js_dumps(obj_name)
405
403
sb.cdp.maximize()
@@ -420,11 +418,11 @@ sb.cdp.get_screen_rect()
420
418
sb.cdp.get_window_rect()
421
419
sb.cdp.get_window_size()
422
420
sb.cdp.get_window_position()
423
- sb.cdp.get_element_rect(selector)
424
- sb.cdp.get_element_size(selector)
425
- sb.cdp.get_element_position(selector)
426
- sb.cdp.get_gui_element_rect(selector)
427
- sb.cdp.get_gui_element_center(selector)
421
+ sb.cdp.get_element_rect(selector, timeout = None )
422
+ sb.cdp.get_element_size(selector, timeout = None )
423
+ sb.cdp.get_element_position(selector, timeout = None )
424
+ sb.cdp.get_gui_element_rect(selector, timeout = None )
425
+ sb.cdp.get_gui_element_center(selector, timeout = None )
428
426
sb.cdp.get_document()
429
427
sb.cdp.get_flattened_document()
430
428
sb.cdp.get_element_attributes(selector)
@@ -452,19 +450,19 @@ sb.cdp.uncheck_if_checked(selector)
452
450
sb.cdp.unselect_if_selected(selector)
453
451
sb.cdp.is_element_present(selector)
454
452
sb.cdp.is_element_visible(selector)
455
- sb.cdp.wait_for_element_visible(selector)
456
- sb.cdp.assert_element(selector)
457
- sb.cdp.assert_element_visible(selector)
458
- sb.cdp.assert_element_present(selector)
459
- sb.cdp.assert_element_absent(selector)
460
- sb.cdp.assert_element_not_visible(selector)
453
+ sb.cdp.wait_for_element_visible(selector, timeout = None )
454
+ sb.cdp.assert_element(selector, timeout = None )
455
+ sb.cdp.assert_element_visible(selector, timeout = None )
456
+ sb.cdp.assert_element_present(selector, timeout = None )
457
+ sb.cdp.assert_element_absent(selector, timeout = None )
458
+ sb.cdp.assert_element_not_visible(selector, timeout = None )
461
459
sb.cdp.assert_element_attribute(selector, attribute, value = None )
462
460
sb.cdp.assert_title(title)
463
461
sb.cdp.assert_title_contains(substring)
464
462
sb.cdp.assert_url(url)
465
463
sb.cdp.assert_url_contains(substring)
466
- sb.cdp.assert_text(text, selector = " html" )
467
- sb.cdp.assert_exact_text(text, selector = " html" )
464
+ sb.cdp.assert_text(text, selector = " html" , timeout = None )
465
+ sb.cdp.assert_exact_text(text, selector = " html" , timeout = None )
468
466
sb.cdp.assert_true()
469
467
sb.cdp.assert_false()
470
468
sb.cdp.assert_equal(first, second)
0 commit comments