-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeenhancementMaking things betterMaking things better
Description
The async CDP Mode API will be expanded to include all the following methods:
await get(url="about:blank")
await open(url="about:blank")
await find(text, best_match=False, timeout=10) # `text` can be a selector
await find_all(text, timeout=10) # `text` can be a selector
await select(selector, timeout=10)
await select_all(selector, timeout=10, include_frames=False)
await query_selector(selector)
await query_selector_all(selector)
await find_element_by_text(text, best_match=False)
await find_elements_by_text(text)
await reload(ignore_cache=True, script_to_evaluate_on_load=None)
await evaluate(expression)
await js_dumps(obj_name)
await back()
await forward()
await get_window()
await get_content()
await maximize()
await minimize()
await fullscreen()
await medimize()
await set_window_size(left=0, top=0, width=1280, height=1024)
await set_window_rect(left=0, top=0, width=1280, height=1024)
await activate()
await bring_to_front()
await set_window_state(left=0, top=0, width=1280, height=720, state="normal")
await get_navigation_history()
await open_external_inspector() # Open a separate browser for debugging
await close()
await scroll_down(amount=25)
await scroll_up(amount=25)
await wait_for(selector="", text="", timeout=10)
await download_file(url, filename=None)
await save_screenshot(filename="auto", format="png", full_page=False)
await print_to_pdf(filename="auto")
await set_download_path(path)
await get_all_linked_sources()
await get_all_urls(absolute=True)
await get_html()
await get_page_source()
await is_element_present(selector)
await is_element_visible(selector)
await get_element_rect(selector, timeout=5) # (relative to window)
await get_window_rect()
await get_gui_element_rect(selector, timeout=5) # (relative to screen)
await get_title()
await send_keys(selector, text, timeout=5)
await type(selector, text, timeout=5)
await click(selector, timeout=5)
await click_with_offset(selector, x, y, center=False, timeout=5)
await solve_captcha()
await click_captcha() # Same as solve_captcha()
await get_document()
await get_flattened_document()
await get_local_storage()
await set_local_storage(items)This includes solve_captcha() / click_captcha().
(Note that some of these methods already exist.)
Metadata
Metadata
Assignees
Labels
UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeenhancementMaking things betterMaking things better