Skip to main content

Generated by tools/parity/render_docs.py from parity/api.toml; do not edit by hand.

This crate tracks SeleniumBase 4.55.2 (5fc0c4bd5c) and seleniumbase-mcp (cecbdc68f8), synced 2026-10-08.

StatusMeaning
implementedA Rust item with the same name exists.
composedRust does it with a different item or a composition.
not-applicableNothing to port; the reason is given.
plannedNot done yet.

Summary#

SurfaceTotalimplementedcomposednot-applicableplanned
BaseCase methods4534403100
Driver methods7977200
CDP Mode methods21515186140
Command-line commands3621780
pytest options263112105460
SB() arguments1075040170
Driver() arguments74403130
MCP: CDP server2424000
MCP: Driver server2626000
MCP: SB server8888000

BaseCase methods#

BaseCase (Python BaseCase).

UpstreamStatusRustNotes
accept_alertimplementedBaseCase::accept_alert
activate_cdp_modeimplementedBaseCase::activate_cdp_mode
activate_demo_modeimplementedBaseCase::activate_demo_mode
activate_design_modeimplementedBaseCase::activate_design_mode
activate_jqueryimplementedBaseCase::activate_jquery
activate_jquery_confirmimplementedBaseCase::activate_jquery_confirm
activate_messengerimplementedBaseCase::activate_messenger
activate_recorderimplementedBaseCase::activate_recorder
ad_blockimplementedBaseCase::ad_block
add_cookieimplementedBaseCase::add_cookie
add_cookiesimplementedBaseCase::add_cookies
add_css_linkimplementedBaseCase::add_css_link
add_css_styleimplementedBaseCase::add_css_style
add_data_pointimplementedBaseCase::add_data_point
add_js_codeimplementedBaseCase::add_js_code
add_js_code_from_linkimplementedBaseCase::add_js_code_from_link
add_js_linkimplementedBaseCase::add_js_link
add_meta_tagimplementedBaseCase::add_meta_tag
add_series_to_chartimplementedBaseCase::add_series_to_chart
add_slideimplementedBaseCase::add_slide
add_textimplementedBaseCase::add_text
add_tour_stepimplementedBaseCase::add_tour_step
append_data_to_fileimplementedBaseCase::append_data_to_file
append_data_to_logsimplementedBaseCase::append_data_to_logs
assert_any_of_elements_presentimplementedBaseCase::assert_any_of_elements_present
assert_any_of_elements_visibleimplementedBaseCase::assert_any_of_elements_visible
assert_attributeimplementedBaseCase::assert_attribute
assert_attribute_not_presentimplementedBaseCase::assert_attribute_not_present
assert_data_in_downloaded_fileimplementedBaseCase::assert_data_in_downloaded_file
assert_downloaded_fileimplementedBaseCase::assert_downloaded_fileDiffers: Waits for the default timeout (set_timeout), not a per-call one, and looks only in the OS downloads folder; Python’s browser flag and its downloaded_files folder are not used.
assert_downloaded_file_regeximplementedBaseCase::assert_downloaded_file_regex
assert_elementimplementedBaseCase::assert_element
assert_element_absentimplementedBaseCase::assert_element_absent
assert_element_not_presentimplementedBaseCase::assert_element_not_present
assert_element_not_visibleimplementedBaseCase::assert_element_not_visible
assert_element_presentimplementedBaseCase::assert_element_present
assert_element_visibleimplementedBaseCase::assert_element_visible
assert_elementsimplementedBaseCase::assert_elements
assert_elements_presentimplementedBaseCase::assert_elements_present
assert_elements_visibleimplementedBaseCase::assert_elements_visible
assert_equalimplementedBaseCase::assert_equal
assert_exact_textimplementedBaseCase::assert_exact_textDiffers: Waits up to the default timeout (set_timeout, 10 seconds unless changed), where Python uses SMALL_TIMEOUT (6 seconds); has no timeout or by arguments (use set_timeout, or wait_for_exact_text for a timeout of its own).
assert_exact_text_not_visibleimplementedBaseCase::assert_exact_text_not_visibleDiffers: Waits up to the default timeout (set_timeout, 10 seconds unless changed), where Python uses SMALL_TIMEOUT (6 seconds); has no timeout or by arguments (use set_timeout, or wait_for_exact_text_not_visible for a timeout of its own).
assert_falseimplementedBaseCase::assert_false
assert_inimplementedBaseCase::assert_in
assert_linkimplementedBaseCase::assert_link
assert_link_status_code_is_not_404implementedBaseCase::assert_link_status_code_is_not_404
assert_link_textimplementedBaseCase::assert_link_text
assert_no_404_errorsimplementedBaseCase::assert_no_404_errors
assert_no_broken_linksimplementedBaseCase::assert_no_broken_links
assert_no_js_errorsimplementedBaseCase::assert_no_js_errors
assert_non_empty_textimplementedBaseCase::assert_non_empty_text
assert_not_equalimplementedBaseCase::assert_not_equal
assert_not_inimplementedBaseCase::assert_not_in
assert_partial_link_textimplementedBaseCase::assert_partial_link_text
assert_pdf_textimplementedBaseCase::assert_pdf_text
assert_raisesimplementedBaseCase::assert_raises
assert_textimplementedBaseCase::assert_textDiffers: Waits up to the default timeout (set_timeout, 10 seconds unless changed), where Python uses SMALL_TIMEOUT (6 seconds); has no timeout or by arguments (use set_timeout, or wait_for_text for a timeout of its own).
assert_text_not_visibleimplementedBaseCase::assert_text_not_visibleDiffers: Waits up to the default timeout (set_timeout, 10 seconds unless changed), where Python uses SMALL_TIMEOUT (6 seconds); has no timeout or by arguments (use set_timeout, or wait_for_text_not_visible for a timeout of its own).
assert_text_visibleimplementedBaseCase::assert_text_visibleDiffers: Waits up to the default timeout (set_timeout, 10 seconds unless changed), where Python uses SMALL_TIMEOUT (6 seconds); has no timeout or by arguments (use set_timeout, or wait_for_text_visible for a timeout of its own).
assert_titleimplementedBaseCase::assert_title
assert_title_containsimplementedBaseCase::assert_title_contains
assert_trueimplementedBaseCase::assert_true
assert_urlimplementedBaseCase::assert_url
assert_url_containsimplementedBaseCase::assert_url_contains
begin_presentationimplementedBaseCase::begin_presentation
block_adsimplementedBaseCase::block_ads
bring_active_window_to_frontimplementedBaseCase::bring_active_window_to_front
bring_to_frontimplementedBaseCase::bring_to_front
check_if_uncheckedimplementedBaseCase::check_if_unchecked
check_windowimplementedBaseCase::check_windowDiffers: Saves and compares the page’s tag structure as Python does: visual_baseline/<test>/<name> holds page_url.txt, baseline.png and tags_level_1.txt to tags_level_3.txt, with one entry for each tag below <body> (the tag names, then the sorted attribute names, then the attribute values), a level of 0 is a dry run, and a page on another domain fails. Differs: Rust has no test id, so <test> is the name given with BaseCase::with_test_name (sb_test! does) or else the name of the running thread (the test’s name under cargo test); the screenshot is of the window, not of <body>, and is not compared; the page source is parsed by the scraper crate, not html.parser; the baseline, check_domain and full_diff arguments are not ported, nor is the side-by-side report Python writes for a level-0 difference; level is a u8 and anything but 0, 1, 2 or 3 is an InvalidConfig error.
choose_fileimplementedBaseCase::choose_file
clearimplementedBaseCase::clear
clear_all_cookiesimplementedBaseCase::clear_all_cookies
clear_local_storageimplementedBaseCase::clear_local_storage
clear_session_storageimplementedBaseCase::clear_session_storage
clickimplementedBaseCase::clickDiffers: Takes CSS or XPath; there is no per-call timeout argument (use set_timeout).
click_active_elementimplementedBaseCase::click_active_element
click_chainimplementedBaseCase::click_chain
click_if_visibleimplementedBaseCase::click_if_visibleDiffers: Looks once, like Python’s default timeout=0; click_if_visible_with_timeout(selector, Duration) waits for the element. There is no scroll argument.
click_linkimplementedBaseCase::click_link
click_link_textimplementedBaseCase::click_link_text
click_nth_visible_elementimplementedBaseCase::click_nth_visible_elementDiffers: Counts from 0; Python counts from 1.
click_partial_linkimplementedBaseCase::click_partial_link
click_partial_link_textimplementedBaseCase::click_partial_link_text
click_visible_elementsimplementedBaseCase::click_visible_elements
click_with_offsetimplementedBaseCase::click_with_offsetThe offset is from the element’s top-left corner, or from its centre when center is true, as in Python. Differs: Takes whole-pixel offsets (Python takes numbers), and no mark, timeout or scroll arguments; it waits for the element to be displayed for the default timeout. In demo mode it outlines the element but draws no dot.
click_xpathimplementedBaseCase::click_xpath
console_log_scriptimplementedBaseCase::console_log_script
console_log_stringimplementedBaseCase::console_log_string
context_clickimplementedBaseCase::context_click
convert_css_to_xpathimplementedBaseCase::convert_css_to_xpath
convert_to_css_selectorimplementedBaseCase::convert_to_css_selectorDiffers: Takes no by argument: the strategy is read from the selector, as the other methods do. Link text, which Python turns into a :contains() pseudo-class that is not CSS, is an InvalidSelector error.
convert_xpath_to_cssimplementedBaseCase::convert_xpath_to_cssDiffers: Converts the forms that have an exact CSS equivalent: paths (//a/b, //a//b, /html/body), a position that is the first test of its step, contains(@a,‘v’), starts-with(@a,‘v’) (Python has none), id(‘x’) and or (a comma list). Returns an InvalidSelector error for text(), contains(.,…), parent:: and a position after another test, where Python writes a :contains() pseudo-class that is not CSS or a selector that matches other elements. The CSS is spelled [id=‘x’] and [class=‘x’] where Python writes #x and .x.
create_area_chartimplementedBaseCase::create_area_chart
create_bar_chartimplementedBaseCase::create_bar_chart
create_bootstrap_tourimplementedBaseCase::create_bootstrap_tour
create_column_chartimplementedBaseCase::create_column_chart
create_driverjs_tourimplementedBaseCase::create_driverjs_tour
create_folderimplementedBaseCase::create_folder
create_hopscotch_tourimplementedBaseCase::create_hopscotch_tour
create_introjs_tourimplementedBaseCase::create_introjs_tour
create_line_chartimplementedBaseCase::create_line_chart
create_pie_chartimplementedBaseCase::create_pie_chart
create_presentationimplementedBaseCase::create_presentation
create_shepherd_tourimplementedBaseCase::create_shepherd_tour
create_tourimplementedBaseCase::create_tour
deactivate_demo_modeimplementedBaseCase::deactivate_demo_mode
deactivate_design_modeimplementedBaseCase::deactivate_design_mode
deferred_assert_elementimplementedBaseCase::deferred_assert_elementDiffers: Checks at once and records a failure for process_deferred_asserts, as Python does; returns Ok(()) instead of True or False, and has no timeout or fs arguments (a failure screenshot is not taken).
deferred_assert_element_presentimplementedBaseCase::deferred_assert_element_presentDiffers: Checks at once and records a failure for process_deferred_asserts, as Python does; returns Ok(()) instead of True or False, and has no timeout or fs arguments (a failure screenshot is not taken).
deferred_assert_exact_textimplementedBaseCase::deferred_assert_exact_textDiffers: Checks at once and records a failure for process_deferred_asserts, as Python does; returns Ok(()) instead of True or False, and has no timeout or fs arguments (a failure screenshot is not taken).
deferred_assert_non_empty_textimplementedBaseCase::deferred_assert_non_empty_textDiffers: Checks at once and records a failure for process_deferred_asserts, as Python does; returns Ok(()) instead of True or False, and has no timeout or fs arguments (a failure screenshot is not taken).
deferred_assert_textimplementedBaseCase::deferred_assert_textDiffers: Checks at once and records a failure for process_deferred_asserts, as Python does; returns Ok(()) instead of True or False, and has no timeout or fs arguments (a failure screenshot is not taken).
deferred_check_windowimplementedBaseCase::deferred_check_windowDiffers: Takes the name and level; the failure is recorded, with the page’s URL, for process_deferred_asserts. Same differences as check_window.
delayed_assert_elementimplementedBaseCase::delayed_assert_element
delayed_assert_element_presentimplementedBaseCase::delayed_assert_element_present
delayed_assert_exact_textimplementedBaseCase::delayed_assert_exact_text
delayed_assert_non_empty_textimplementedBaseCase::delayed_assert_non_empty_text
delayed_assert_textimplementedBaseCase::delayed_assert_text
delayed_check_windowimplementedBaseCase::delayed_check_window
delete_all_cookiesimplementedBaseCase::delete_all_cookies
delete_downloaded_fileimplementedBaseCase::delete_downloaded_file
delete_downloaded_file_if_presentimplementedBaseCase::delete_downloaded_file_if_present
delete_local_storageimplementedBaseCase::delete_local_storage
delete_saved_cookiesimplementedBaseCase::delete_saved_cookies
delete_session_storageimplementedBaseCase::delete_session_storage
disable_beforeunloadimplementedBaseCase::disable_beforeunload
dismiss_alertimplementedBaseCase::dismiss_alert
display_chartimplementedBaseCase::display_chart
double_clickimplementedBaseCase::double_click
double_click_with_offsetimplementedBaseCase::double_click_with_offsetThe offset is from the element’s top-left corner, or from its centre when center is true, as in Python. Differs: Takes whole-pixel offsets (Python takes numbers), and no mark, timeout or scroll arguments; it waits for the element to be displayed for the default timeout.
download_fileimplementedBaseCase::download_fileDiffers: Opens the URL in a browser tab and waits for the browser to save it, taking a file name and timeout; Python fetches it over HTTP into a folder.
drag_and_dropimplementedBaseCase::drag_and_drop
drag_and_drop_with_offsetimplementedBaseCase::drag_and_drop_with_offset
enter_mfa_codeimplementedBaseCase::enter_mfa_code
enter_totp_codeimplementedBaseCase::enter_totp_code
evaluateimplementedBaseCase::evaluate
execute_async_scriptimplementedBaseCase::execute_async_script
execute_cdp_cmdimplementedBaseCase::execute_cdp_cmd
execute_scriptimplementedBaseCase::execute_scriptDiffers: Takes the script only; pass values by formatting them in, each one quoted with js_code::quote.
export_tourimplementedBaseCase::export_tour
extract_chartimplementedBaseCase::extract_chart
failimplementedBaseCase::fail
fast_typeimplementedBaseCase::fast_type
fillimplementedBaseCase::fill
find_elementimplementedBaseCase::find_elementDiffers: Returns a thirtyfour::WebElement; takes CSS or XPath only.
find_elementsimplementedBaseCase::find_elementsDiffers: Returns thirtyfour::WebElements; takes CSS or XPath only.
find_exact_textimplementedBaseCase::find_exact_textDiffers: Takes no timeout: it waits for the default timeout (set_timeout). Fails with a wait timeout.
find_link_textimplementedBaseCase::find_link_text
find_non_empty_textimplementedBaseCase::find_non_empty_textDiffers: Takes no timeout: it waits for the default timeout (set_timeout). Fails with a wait timeout.
find_partial_link_textimplementedBaseCase::find_partial_link_text
find_textimplementedBaseCase::find_textDiffers: Takes no timeout: it waits for the default timeout (set_timeout). Fails with a wait timeout.
find_visible_elementsimplementedBaseCase::find_visible_elements
flashimplementedBaseCase::flash
focusimplementedBaseCase::focus
frame_switchimplementedBaseCase::frame_switch
generate_referralimplementedBaseCase::generate_referralA real click-through: it opens start_page (an empty string means the current page), builds a link to destination_page in it with a script and clicks it, so the destination receives a Referer header. With a selector, that element is clicked on the destination page too. Differs: Builds the link with DOM calls and quotes the URL, where Python pastes it into markup; waits for the destination’s readyState after the click, where Python only pauses 0.15 s. An invalid page is SeleniumBaseError::Parse, checked before the browser is touched.
generate_referral_chainimplementedBaseCase::generate_referral_chainTakes a slice of pages. Builds and clicks a link to each page in turn, starting from the page the browser is on, so each page after the first sees the one before it as its Referer. Differs: Fewer than two pages is SeleniumBaseError::InvalidConfig and an invalid page is SeleniumBaseError::Parse, both before the first click (Python raises plain exceptions).
generate_trafficimplementedBaseCase::generate_trafficRuns generate_referral loops times (a u32), with a 0.05 s pause after each.
generate_traffic_chainimplementedBaseCase::generate_traffic_chainRuns generate_referral_chain loops times (a u32), with a 0.05 s pause after each.
getimplementedBaseCase::get
get_active_element_cssimplementedBaseCase::get_active_element_css
get_attributeimplementedBaseCase::get_attribute
get_beautiful_soupimplementedBaseCase::get_beautiful_soup
get_browser_downloads_folderimplementedBaseCase::get_browser_downloads_folder
get_chrome_versionimplementedBaseCase::get_chrome_version
get_chromedriver_versionimplementedBaseCase::get_chromedriver_version
get_chromium_driver_versionimplementedBaseCase::get_chromium_driver_version
get_chromium_versionimplementedBaseCase::get_chromium_version
get_cookieimplementedBaseCase::get_cookie
get_cookie_stringimplementedBaseCase::get_cookie_string
get_cookiesimplementedBaseCase::get_cookiesDiffers: Returns a serde_json::Value.
get_current_urlimplementedBaseCase::get_current_url
get_data_from_downloaded_fileimplementedBaseCase::get_data_from_downloaded_file
get_domain_urlimplementedBaseCase::get_domain_url
get_downloaded_filesimplementedBaseCase::get_downloaded_files
get_downloads_folderimplementedBaseCase::get_downloads_folder
get_elementimplementedBaseCase::get_element
get_element_at_x_yimplementedBaseCase::get_element_at_x_y
get_file_dataimplementedBaseCase::get_file_data
get_google_auth_codeimplementedBaseCase::get_google_auth_code
get_google_auth_passwordcomposedBaseCase::get_mfa_codeSame TOTP computation.
get_gui_element_centerimplementedBaseCase::get_gui_element_center
get_gui_element_rectimplementedBaseCase::get_gui_element_rect
get_htmlimplementedBaseCase::get_html
get_image_urlimplementedBaseCase::get_image_url
get_jqc_button_inputnot-applicableJQuery-Confirm dialogs are a page UI; Rust uses native dialogs (show_prompt, show_confirm).
get_jqc_form_inputsnot-applicableJQuery-Confirm dialogs are a page UI; Rust uses native dialogs (show_prompt, show_confirm).
get_jqc_text_inputnot-applicableJQuery-Confirm dialogs are a page UI; Rust uses native dialogs (show_prompt, show_confirm).
get_link_attributeimplementedBaseCase::get_link_attribute
get_link_status_codeimplementedBaseCase::get_link_status_code
get_link_text_attributeimplementedBaseCase::get_link_text_attribute
get_local_storage_itemimplementedBaseCase::get_local_storage_item
get_local_storage_itemsimplementedBaseCase::get_local_storage_items
get_local_storage_keysimplementedBaseCase::get_local_storage_keys
get_locale_codeimplementedBaseCase::get_locale_code
get_mfa_codeimplementedBaseCase::get_mfa_code
get_new_driverimplementedBaseCase::get_new_driverDiffers: Returns a DriverId, not the driver object. The browser options of Python’s arguments go in a BrowserConfig: get_new_driver_with(config).
get_originimplementedBaseCase::get_origin
get_page_sourceimplementedBaseCase::get_page_source
get_page_titleimplementedBaseCase::get_page_title
get_parentimplementedBaseCase::get_parent
get_partial_link_text_attributeimplementedBaseCase::get_partial_link_text_attribute
get_path_of_downloaded_fileimplementedBaseCase::get_path_of_downloaded_file
get_pdf_textimplementedBaseCase::get_pdf_text
get_propertyimplementedBaseCase::get_property
get_property_valueimplementedBaseCase::get_property_value
get_recorded_console_logsimplementedBaseCase::get_recorded_console_logs
get_saved_cookiesimplementedBaseCase::get_saved_cookies
get_screen_rectimplementedBaseCase::get_screen_rect
get_select_optionsimplementedBaseCase::get_select_options
get_session_storage_itemimplementedBaseCase::get_session_storage_item
get_session_storage_itemsimplementedBaseCase::get_session_storage_items
get_session_storage_keysimplementedBaseCase::get_session_storage_keys
get_textimplementedBaseCase::get_text
get_text_contentimplementedBaseCase::get_text_content
get_titleimplementedBaseCase::get_title
get_totp_codeimplementedBaseCase::get_totp_code
get_unique_linksimplementedBaseCase::get_unique_links
get_user_agentimplementedBaseCase::get_user_agent
get_valueimplementedBaseCase::get_value
get_window_positionimplementedBaseCase::get_window_position
get_window_rectimplementedBaseCase::get_window_rectDiffers: Returns an (x, y, width, height) tuple; Python returns a dict.
get_window_sizeimplementedBaseCase::get_window_size
go_backimplementedBaseCase::go_back
go_forwardimplementedBaseCase::go_forward
go_toimplementedBaseCase::go_to
gotoimplementedBaseCase::goto
goto_if_not_urlimplementedBaseCase::goto_if_not_url
goto_start_pageimplementedBaseCase::goto_start_page
has_exceptionnot-applicableunittest/pytest harness plumbing; the Rust runner (api::runner) owns the lifecycle.
hide_elementimplementedBaseCase::hide_element
hide_elementsimplementedBaseCase::hide_elements
highlightimplementedBaseCase::highlightDiffers: Scrolls to the element and outlines it once for about a second, restored by a timer in the page, so the call does not block; Python animates the element for loops rounds and takes scroll and timeout arguments.
highlight_clickimplementedBaseCase::highlight_click
highlight_elementsimplementedBaseCase::highlight_elements
highlight_if_visibleimplementedBaseCase::highlight_if_visible
highlight_typeimplementedBaseCase::highlight_type
highlight_update_textimplementedBaseCase::highlight_update_text
hoverimplementedBaseCase::hover
hover_and_clickimplementedBaseCase::hover_and_click
hover_and_double_clickimplementedBaseCase::hover_and_double_click
hover_and_js_clickimplementedBaseCase::hover_and_js_click
hover_elementimplementedBaseCase::hover_element
hover_on_elementimplementedBaseCase::hover_on_element
hover_over_elementimplementedBaseCase::hover_over_element
inputimplementedBaseCase::input
inspect_htmlimplementedBaseCase::inspect_html
install_addonimplementedBaseCase::install_addonInstalls a Firefox add-on, an .xpi file or an unpacked add-on directory, through geckodriver’s moz/addon/install command and returns the add-on id; BaseCase::uninstall_addon removes it again. A session that is not Firefox gets an Unsupported error. Tested against a mock WebDriver for the exact endpoint and JSON body. Checked against a real geckodriver 0.37.1 and Firefox 153 ESR in Docker (docker/firefox-check): the same bodies sent with curl installed a directory and an .xpi, the add-on’s content script ran, and the uninstall stopped it; tests/install_addon_firefox.rs (ignored) runs BaseCase against that geckodriver and installs and removes an add-on. Differs: Takes a temporary flag where Python’s install_addon always installs a temporary add-on, and returns the id. Sends geckodriver the path, where Python’s Selenium reads the file and sends it as base64, so the file has to be on the machine geckodriver runs on. A path with .. in it, one that does not exist, and one that is neither an .xpi file nor a directory are refused before anything is sent.
internalize_linksimplementedBaseCase::internalize_links
is_alert_presentimplementedBaseCase::is_alert_present
is_attribute_presentimplementedBaseCase::is_attribute_present
is_checkedimplementedBaseCase::is_checked
is_chromiumimplementedBaseCase::is_chromium
is_connectedimplementedBaseCase::is_connected
is_downloaded_file_presentimplementedBaseCase::is_downloaded_file_present
is_downloaded_file_regex_presentimplementedBaseCase::is_downloaded_file_regex_present
is_element_clickableimplementedBaseCase::is_element_clickable
is_element_enabledimplementedBaseCase::is_element_enabled
is_element_in_an_iframeimplementedBaseCase::is_element_in_an_iframe
is_element_presentimplementedBaseCase::is_element_present
is_element_visibleimplementedBaseCase::is_element_visible
is_exact_text_visibleimplementedBaseCase::is_exact_text_visible
is_link_text_presentimplementedBaseCase::is_link_text_present
is_link_text_visibleimplementedBaseCase::is_link_text_visible
is_non_empty_text_visibleimplementedBaseCase::is_non_empty_text_visible
is_onlineimplementedBaseCase::is_online
is_partial_link_text_presentimplementedBaseCase::is_partial_link_text_present
is_partial_link_text_visibleimplementedBaseCase::is_partial_link_text_visible
is_selectedimplementedBaseCase::is_selected
is_text_visibleimplementedBaseCase::is_text_visible
is_valid_urlimplementedBaseCase::is_valid_url
jq_formatimplementedBaseCase::jq_format
jquery_clickimplementedBaseCase::jquery_click
jquery_click_allimplementedBaseCase::jquery_click_all
jquery_typeimplementedBaseCase::jquery_type
jquery_update_textimplementedBaseCase::jquery_update_text
js_clickimplementedBaseCase::js_click
js_click_allimplementedBaseCase::js_click_all
js_click_if_presentimplementedBaseCase::js_click_if_present
js_click_if_visibleimplementedBaseCase::js_click_if_visible
js_typeimplementedBaseCase::js_type
js_update_textimplementedBaseCase::js_update_text
load_cookiesimplementedBaseCase::load_cookiesDiffers: The expiry argument is a CookieExpiry (load_cookies_with); load_cookies_from_path reads a file at any path, for the MCP server and the CLI.
load_html_fileimplementedBaseCase::load_html_file
load_html_stringimplementedBaseCase::load_html_string
locatorimplementedBaseCase::locator
mainnot-applicableunittest/pytest harness plumbing; the Rust runner (api::runner) owns the lifecycle.
maximizeimplementedBaseCase::maximize
maximize_windowimplementedBaseCase::maximize_window
minimizeimplementedBaseCase::minimize
minimize_windowimplementedBaseCase::minimize_window
openimplementedBaseCase::open
open_html_fileimplementedBaseCase::open_html_file
open_if_not_urlimplementedBaseCase::open_if_not_url
open_new_tabimplementedBaseCase::open_new_tabDiffers: Always switches to the new tab; Python has a switch_to option.
open_new_windowimplementedBaseCase::open_new_window
open_start_pageimplementedBaseCase::open_start_page
open_urlimplementedBaseCase::open_url
play_tourimplementedBaseCase::play_tour
post_error_messageimplementedBaseCase::post_error_messageDiffers: Shows a plain error box in the corner for the run’s message duration, replacing the one showing; it is not Python’s Messenger widget, takes no duration or pause arguments, and waits for the box to go as Python’s default pause=True does.
post_messageimplementedBaseCase::post_messageDiffers: Shows a plain box, not Python’s Messenger widget (activate_messenger and set_messenger_theme drive the widget), for the run’s message duration, 0.75 s at most in a headless browser, and waits for it to go as the default pause=True does. It takes no duration, pause or style arguments: post_message_for takes the duration.
post_message_and_highlightimplementedBaseCase::post_message_and_highlightDiffers: Shows a plain box (see post_success_message), then highlights the selector’s element as Python does; it does not wait for the message to go first.
post_success_messageimplementedBaseCase::post_success_messageDiffers: Shows a plain success box in the corner for the run’s message duration, replacing the one showing; it is not Python’s Messenger widget, takes no duration or pause arguments, and waits for the box to go as Python’s default pause=True does.
press_down_arrowimplementedBaseCase::press_down_arrowDiffers: Presses the Down arrow once on the element that has focus; Python’s takes a selector (default body) and a repeat count.
press_keysimplementedBaseCase::press_keysDiffers: Takes the CSS selector and the text, like Python, and types the text one key at a time with a trailing newline pressing Enter; it has no timeout argument (use set_timeout). BaseCase::press_key presses one named key on whatever has focus.
press_left_arrowimplementedBaseCase::press_left_arrowDiffers: Presses the Left arrow once on the element that has focus; Python’s takes a selector (default body) and a repeat count.
press_right_arrowimplementedBaseCase::press_right_arrowDiffers: Presses the Right arrow once on the element that has focus; Python’s takes a selector (default body) and a repeat count.
press_up_arrowimplementedBaseCase::press_up_arrowDiffers: Presses the Up arrow once on the element that has focus; Python’s takes a selector (default body) and a repeat count.
print_to_pdfimplementedBaseCase::print_to_pdf
print_unique_links_with_status_codesimplementedBaseCase::print_unique_links_with_status_codes
process_deferred_assertsimplementedBaseCase::process_deferred_asserts
process_delayed_assertsimplementedBaseCase::process_delayed_asserts
quit_extra_driverimplementedBaseCase::quit_extra_driverDiffers: Takes the DriverId get_new_driver returned, where Python takes the driver (or None for the active one); the default browser is refused, and quitting the active extra browser falls back to the default one.
refreshimplementedBaseCase::refresh
refresh_pageimplementedBaseCase::refresh_page
reloadimplementedBaseCase::reload
reload_pageimplementedBaseCase::reload_page
remove_attributeimplementedBaseCase::remove_attribute
remove_attributesimplementedBaseCase::remove_attributes
remove_elementimplementedBaseCase::remove_element
remove_elementsimplementedBaseCase::remove_elements
remove_local_storage_itemimplementedBaseCase::remove_local_storage_item
remove_session_storage_itemimplementedBaseCase::remove_session_storage_item
reset_default_timeoutimplementedBaseCase::reset_default_timeoutPuts back the default wait from before set_default_timeout.
reset_jqc_themeimplementedBaseCase::reset_jqc_theme
reset_window_sizeimplementedBaseCase::reset_window_size
right_clickimplementedBaseCase::right_click
runnot-applicableunittest/pytest harness plumbing; the Rust runner (api::runner) owns the lifecycle.
safe_execute_scriptimplementedBaseCase::safe_execute_script
save_as_htmlimplementedBaseCase::save_as_html
save_as_html_to_logsimplementedBaseCase::save_as_html_to_logs
save_as_pdfimplementedBaseCase::save_as_pdf
save_as_pdf_to_logsimplementedBaseCase::save_as_pdf_to_logs
save_chartimplementedBaseCase::save_chart
save_cookiesimplementedBaseCase::save_cookiesDiffers: Returns the path it wrote; save_cookies_to_path writes to any path, for the MCP server and the CLI.
save_data_asimplementedBaseCase::save_data_as
save_data_to_logsimplementedBaseCase::save_data_to_logs
save_element_as_image_fileimplementedBaseCase::save_element_as_image_file
save_file_asimplementedBaseCase::save_file_as
save_page_sourceimplementedBaseCase::save_page_source
save_page_source_to_logsimplementedBaseCase::save_page_source_to_logs
save_presentationimplementedBaseCase::save_presentation
save_recorded_actionsimplementedBaseCase::save_recorded_actions
save_screenshotimplementedBaseCase::save_screenshot
save_screenshot_to_logsimplementedBaseCase::save_screenshot_to_logs
save_teardown_screenshotimplementedBaseCase::save_teardown_screenshot
scroll_by_yimplementedBaseCase::scroll_by_y
scroll_downimplementedBaseCase::scroll_downDiffers: Takes no amount; Python scrolls by a percentage of the window height.
scroll_into_viewimplementedBaseCase::scroll_into_view
scroll_toimplementedBaseCase::scroll_to
scroll_to_bottomimplementedBaseCase::scroll_to_bottom
scroll_to_elementimplementedBaseCase::scroll_to_element
scroll_to_topimplementedBaseCase::scroll_to_top
scroll_to_yimplementedBaseCase::scroll_to_y
scroll_upimplementedBaseCase::scroll_upDiffers: Takes no amount; Python scrolls by a percentage of the window height.
selectimplementedBaseCase::select
select_allimplementedBaseCase::select_all
select_if_unselectedimplementedBaseCase::select_if_unselected
select_option_by_indeximplementedBaseCase::select_option_by_index
select_option_by_textimplementedBaseCase::select_option_by_text
select_option_by_valueimplementedBaseCase::select_option_by_value
send_keysimplementedBaseCase::send_keys
setUpnot-applicableunittest/pytest harness plumbing; the Rust runner (api::runner) owns the lifecycle.
setUpClassnot-applicableunittest/pytest harness plumbing; the Rust runner (api::runner) owns the lifecycle.
set_attributeimplementedBaseCase::set_attribute
set_attribute_allimplementedBaseCase::set_attribute_all
set_attributesimplementedBaseCase::set_attributes
set_contentimplementedBaseCase::set_content
set_content_to_defaultimplementedBaseCase::set_content_to_defaultBrings back the page that set_content_to_frame replaced (all swaps at once). Python’s nested=True is the separate method set_content_to_parent. Differs: With no frame swapped in it only leaves the frame the driver is in (switch_to_default_content), where Python refreshes the page. A swap whose page counters were lost to a navigation is answered with a refresh, as in Python.
set_content_to_default_contentimplementedBaseCase::set_content_to_default_contentSame as set_content_to_default.
set_content_to_frameimplementedBaseCase::set_content_to_frameReplaces the page with the content of an iframe that is on it, selected or named; an iframe whose src is a web or file address opens in a new tab instead. set_content_to_default and set_content_to_parent bring the page back. Differs: Swaps the frame’s head and body in with a parsed document instead of Python’s set_content, and its scripts do not run. Counts nested swaps correctly: Python resets its page counter on every call, so there a second set_content_to_parent only refreshes. Nothing is added to the recording.
set_content_to_parentimplementedBaseCase::set_content_to_parentUndoes the last set_content_to_frame (Python’s set_content_to_default(nested=True)). Differs: With no frame swapped in it only leaves the current frame (switch_to_parent_frame), where Python refreshes the page.
set_content_to_parent_frameimplementedBaseCase::set_content_to_parent_frameSame as set_content_to_parent.
set_default_timeoutimplementedBaseCase::set_default_timeoutRaises or lowers how long actions wait by default; whole seconds, 1 to 60 (Python allows 0.5 to 60).
set_introjs_colorsimplementedBaseCase::set_introjs_colors
set_jqc_themeimplementedBaseCase::set_jqc_theme
set_local_storage_itemimplementedBaseCase::set_local_storage_item
set_messenger_themeimplementedBaseCase::set_messenger_themeTakes MessengerSettings (theme, location, max_messages; the defaults are Python’s), or a MessengerTheme or MessengerLocation alone, and loads Messenger first. The pure-CDP engine has Page::set_messenger_theme with the same arguments. The old colour setter is BaseCase::set_messenger_color. Differs: BaseCase::post_message shows a plain box of its own, so the theme changes the Messenger widget (which the page or your script posts with) and not post_message’s box.
set_session_storage_itemimplementedBaseCase::set_session_storage_item
set_textimplementedBaseCase::set_textDiffers: Sets the value of an input or textarea (firing input and change) or the textContent of any other element, as Python does; it presses no Enter for a trailing newline, and the selector is CSS.
set_text_contentimplementedBaseCase::set_text_contentDiffers: Same as set_text, as in Python; the selector is CSS and there is no scroll argument.
set_time_limitimplementedBaseCase::set_time_limitOnce the test has run longer than the limit (counted from creating the BaseCase), its next open, readiness wait or element action fails with a time-limit error; waits are cut to the time left. It is kept apart from the default wait that set_default_timeout changes.
set_valueimplementedBaseCase::set_value
set_window_positionimplementedBaseCase::set_window_position
set_window_rectimplementedBaseCase::set_window_rectDiffers: Takes (x, y, width, height) with unsigned sizes.
set_window_sizeimplementedBaseCase::set_window_size
show_elementimplementedBaseCase::show_element
show_elementsimplementedBaseCase::show_elements
show_file_choosersimplementedBaseCase::show_file_choosers
skipcomposedBaseCase::skip_testskip_test(message) returns Err(SeleniumBaseError::Skipped) for the test to ? out with. libtest has no runtime skip: run_browser_test (and Plugins::run_browser_test) log the reason and count the test as passed, and any other harness has to map is_skipped() to Ok itself. Python also records the reason for its dashboard and database reports, which is not done here.
sleepimplementedBaseCase::sleepDiffers: Takes seconds as f64 and is async.
slow_clickimplementedBaseCase::slow_click
slow_scroll_toimplementedBaseCase::slow_scroll_to
slow_scroll_to_elementimplementedBaseCase::slow_scroll_to_element
start_recording_console_logsimplementedBaseCase::start_recording_console_logs
start_tourimplementedBaseCase::start_tour
submitimplementedBaseCase::submit
switch_to_alertimplementedBaseCase::switch_to_alert
switch_to_default_contentimplementedBaseCase::switch_to_default_content
switch_to_default_driverimplementedBaseCase::switch_to_default_driver
switch_to_default_tabimplementedBaseCase::switch_to_default_tab
switch_to_default_windowimplementedBaseCase::switch_to_default_window
switch_to_driverimplementedBaseCase::switch_to_driverDiffers: Takes a DriverId, where Python takes the driver object.
switch_to_frameimplementedBaseCase::switch_to_frame
switch_to_frame_of_elementimplementedBaseCase::switch_to_frame_of_elementDiffers: Returns the frame’s name, else its id, else an empty string, or None when the element is in the current document. Looks one level down, as Python does.
switch_to_newest_tabimplementedBaseCase::switch_to_newest_tab
switch_to_newest_windowimplementedBaseCase::switch_to_newest_window
switch_to_parent_frameimplementedBaseCase::switch_to_parent_frame
switch_to_tabimplementedBaseCase::switch_to_tab
switch_to_windowimplementedBaseCase::switch_to_window
tearDownnot-applicableunittest/pytest harness plumbing; the Rust runner (api::runner) owns the lifecycle.
tearDownClassnot-applicableunittest/pytest harness plumbing; the Rust runner (api::runner) owns the lifecycle.
typecomposedBaseCase::type_textOne canonical name: Rust has type_text only.
uncheck_if_checkedimplementedBaseCase::uncheck_if_checked
unselect_if_selectedimplementedBaseCase::unselect_if_selected
update_textimplementedBaseCase::update_text
visitimplementedBaseCase::visit
visit_urlimplementedBaseCase::visit_url
waitimplementedBaseCase::wait
wait_for_and_accept_alertimplementedBaseCase::wait_for_and_accept_alert
wait_for_and_dismiss_alertimplementedBaseCase::wait_for_and_dismiss_alert
wait_for_and_switch_to_alertimplementedBaseCase::wait_for_and_switch_to_alert
wait_for_angularjsimplementedBaseCase::wait_for_angularjs
wait_for_any_of_elements_presentimplementedBaseCase::wait_for_any_of_elements_present
wait_for_any_of_elements_visibleimplementedBaseCase::wait_for_any_of_elements_visible
wait_for_attributeimplementedBaseCase::wait_for_attribute
wait_for_attribute_not_presentimplementedBaseCase::wait_for_attribute_not_present
wait_for_elementimplementedBaseCase::wait_for_element
wait_for_element_absentimplementedBaseCase::wait_for_element_absent
wait_for_element_clickableimplementedBaseCase::wait_for_element_clickable
wait_for_element_not_presentimplementedBaseCase::wait_for_element_not_present
wait_for_element_not_visibleimplementedBaseCase::wait_for_element_not_visible
wait_for_element_presentimplementedBaseCase::wait_for_element_present
wait_for_element_visibleimplementedBaseCase::wait_for_element_visible
wait_for_exact_textimplementedBaseCase::wait_for_exact_text
wait_for_exact_text_not_visibleimplementedBaseCase::wait_for_exact_text_not_visible
wait_for_exact_text_visibleimplementedBaseCase::wait_for_exact_text_visible
wait_for_link_textimplementedBaseCase::wait_for_link_text
wait_for_link_text_presentimplementedBaseCase::wait_for_link_text_present
wait_for_link_text_visibleimplementedBaseCase::wait_for_link_text_visible
wait_for_non_empty_textimplementedBaseCase::wait_for_non_empty_text
wait_for_non_empty_text_visibleimplementedBaseCase::wait_for_non_empty_text_visible
wait_for_partial_link_textimplementedBaseCase::wait_for_partial_link_text
wait_for_partial_link_text_presentimplementedBaseCase::wait_for_partial_link_text_present
wait_for_query_selectorimplementedBaseCase::wait_for_query_selector
wait_for_ready_state_completeimplementedBaseCase::wait_for_ready_state_complete
wait_for_selectorimplementedBaseCase::wait_for_selector
wait_for_textimplementedBaseCase::wait_for_text
wait_for_text_not_visibleimplementedBaseCase::wait_for_text_not_visible
wait_for_text_visibleimplementedBaseCase::wait_for_text_visible
writeimplementedBaseCase::write

Driver methods#

Methods of Python’s Driver().

UpstreamStatusRustNotes
add_cookieimplementedBaseCase::add_cookie
assert_element_not_visibleimplementedBaseCase::assert_element_not_visible
assert_element_presentimplementedBaseCase::assert_element_present
assert_element_visibleimplementedBaseCase::assert_element_visible
assert_exact_textimplementedBaseCase::assert_exact_text
assert_non_empty_textimplementedBaseCase::assert_non_empty_text
assert_textimplementedBaseCase::assert_text
assert_text_not_visibleimplementedBaseCase::assert_text_not_visible
backcomposedBaseCase::go_backNamed go_back, like the BaseCase method.
clickimplementedBaseCase::click
click_active_elementimplementedBaseCase::click_active_element
click_if_visibleimplementedBaseCase::click_if_visible
click_linkimplementedBaseCase::click_link
delete_cookieimplementedBaseCase::delete_cookie
find_elementimplementedBaseCase::find_element
find_elementsimplementedBaseCase::find_elements
forwardcomposedBaseCase::go_forwardNamed go_forward, like the BaseCase method.
get_active_element_cssimplementedBaseCase::get_active_element_css
get_attributeimplementedBaseCase::get_attribute
get_cookieimplementedBaseCase::get_cookie
get_cookie_stringimplementedBaseCase::get_cookie_string
get_current_urlimplementedBaseCase::get_current_url
get_locale_codeimplementedBaseCase::get_locale_code
get_originimplementedBaseCase::get_origin
get_page_sourceimplementedBaseCase::get_page_source
get_parentimplementedBaseCase::get_parent
get_screen_rectimplementedBaseCase::get_screen_rect
get_textimplementedBaseCase::get_text
get_titleimplementedBaseCase::get_title
get_user_agentimplementedBaseCase::get_user_agent
highlightimplementedBaseCase::highlightDiffers: Scrolls to the element and outlines it once for about a second, restored by a timer in the page, so the call does not block; Python animates the element for loops rounds and takes scroll and timeout arguments.
highlight_clickimplementedBaseCase::highlight_click
highlight_if_visibleimplementedBaseCase::highlight_if_visible
is_alert_presentimplementedBaseCase::is_alert_present
is_attribute_presentimplementedBaseCase::is_attribute_present
is_cdp_mode_activeimplementedBaseCase::is_cdp_mode_activeTrue for a session in DriverMode::Cdp or DriverMode::Uc, which are the two that have a CDP client. Differs: Python reports true only after activate_cdp_mode(); UC sessions here have a CDP client from the start.
is_connectedimplementedBaseCase::is_connected
is_element_presentimplementedBaseCase::is_element_present
is_element_visibleimplementedBaseCase::is_element_visible
is_exact_text_visibleimplementedBaseCase::is_exact_text_visible
is_non_empty_text_visibleimplementedBaseCase::is_non_empty_text_visible
is_onlineimplementedBaseCase::is_online
is_text_visibleimplementedBaseCase::is_text_visible
is_uc_mode_activeimplementedBaseCase::is_uc_mode_active
is_valid_urlimplementedBaseCase::is_valid_url
js_clickimplementedBaseCase::js_click
locatorimplementedBaseCase::locator
open_new_tabimplementedBaseCase::open_new_tab
open_new_windowimplementedBaseCase::open_new_window
open_urlimplementedBaseCase::open_url
press_keysimplementedBaseCase::press_keysDiffers: Takes the CSS selector and the text, like Python, and types the text one key at a time with a trailing newline pressing Enter; it has no timeout argument (use set_timeout). BaseCase::press_key presses one named key on whatever has focus.
refreshimplementedBaseCase::refresh
reset_window_sizeimplementedBaseCase::reset_window_size
selectimplementedBaseCase::select
select_allimplementedBaseCase::select_all
select_option_by_indeximplementedBaseCase::select_option_by_index
select_option_by_textimplementedBaseCase::select_option_by_text
select_option_by_valueimplementedBaseCase::select_option_by_value
send_keysimplementedBaseCase::send_keys
submitimplementedBaseCase::submit
switch_to_default_windowimplementedBaseCase::switch_to_default_window
switch_to_frameimplementedBaseCase::switch_to_frame
switch_to_newest_tabimplementedBaseCase::switch_to_newest_tab
switch_to_newest_windowimplementedBaseCase::switch_to_newest_window
switch_to_tabimplementedBaseCase::switch_to_tab
switch_to_windowimplementedBaseCase::switch_to_window
update_textimplementedBaseCase::update_text
wait_for_and_accept_alertimplementedBaseCase::wait_for_and_accept_alert
wait_for_and_dismiss_alertimplementedBaseCase::wait_for_and_dismiss_alert
wait_for_elementimplementedBaseCase::wait_for_element
wait_for_element_absentimplementedBaseCase::wait_for_element_absent
wait_for_element_not_visibleimplementedBaseCase::wait_for_element_not_visible
wait_for_element_presentimplementedBaseCase::wait_for_element_present
wait_for_element_visibleimplementedBaseCase::wait_for_element_visible
wait_for_exact_textimplementedBaseCase::wait_for_exact_text
wait_for_non_empty_textimplementedBaseCase::wait_for_non_empty_text
wait_for_selectorimplementedBaseCase::wait_for_selector
wait_for_textimplementedBaseCase::wait_for_text
wait_for_text_not_visibleimplementedBaseCase::wait_for_text_not_visible

CDP Mode methods#

Python sb.cdp.*; Rust holds the selector in a Locator.

UpstreamStatusRustNotes
activate_cdp_modenot-applicableAlready in CDP mode: sb_cdp is the CDP engine.
activate_messengerimplementedPage::activate_messengerLoads jQuery and the Messenger library from their CDNs into the page; a page with no network cannot.
add_handlernot-applicableSubscribe to protocol events with Page::events / Browser::events.
append_data_to_logsnot-applicableWrite files with std::fs; artifacts::ensure_latest_logs_dir gives the logs folder.
assert_any_of_elements_presentcomposedPage::wait_for_anypage.wait_for_any(..) waits until one of several locators is ready and says which; it returns a timeout error where Python raises.
assert_any_of_elements_visiblecomposedPage::wait_for_anypage.wait_for_any(..) waits until one of several locators is ready and says which; it returns a timeout error where Python raises.
assert_downloaded_fileimplementedPage::assert_downloaded_filepage.assert_downloaded_file(name, timeout) waits for the file in Browser::download_dir (the folder last given to set_download_dir or to a Page download method) and returns its path. A download the browser has not finished does not count. Differs: Looks in the folder the browser was told to save in, where Python always looks in ./downloaded_files (that is the default until a folder is chosen). Fails with SeleniumBaseError::WaitTimeout, where Python raises NoSuchFileException, and takes a Duration. The name must be a plain file name.
assert_elementcomposedLocatorExpect::to_be_visibleAssert with page.locator(selector).expect().to_be_visible(..); add .not() to negate and .timeout(d) to set the wait. A failed expectation returns an error where Python raises AssertionError.
assert_element_absentcomposedLocatorExpect::to_existpage.locator(selector).expect().not().to_exist(); the wait is the expect timeout.
assert_element_attributecomposedLocatorExpect::to_have_attributeAssert with page.locator(selector).expect().to_have_attribute(..); add .not() to negate and .timeout(d) to set the wait. A failed expectation returns an error where Python raises AssertionError.
assert_element_not_visiblecomposedLocatorExpect::to_be_hiddenpage.locator(selector).expect().to_be_hidden(); the wait is the expect timeout.
assert_element_presentcomposedLocatorExpect::to_existpage.locator(selector).expect().to_exist(); the wait is the expect timeout.
assert_element_visiblecomposedLocatorExpect::to_be_visibleAssert with page.locator(selector).expect().to_be_visible(..); add .not() to negate and .timeout(d) to set the wait. A failed expectation returns an error where Python raises AssertionError.
assert_equalnot-applicableRust has assert!, assert_eq! and friends.
assert_exact_textcomposedLocatorExpect::to_have_textpage.locator(selector).expect().to_have_text(text), which compares the whole text.
assert_falsenot-applicableRust has assert!, assert_eq! and friends.
assert_innot-applicableRust has assert!, assert_eq! and friends.
assert_not_equalnot-applicableRust has assert!, assert_eq! and friends.
assert_not_innot-applicableRust has assert!, assert_eq! and friends.
assert_textcomposedLocatorExpect::to_contain_textAssert with page.locator(selector).expect().to_contain_text(..); add .not() to negate and .timeout(d) to set the wait. A failed expectation returns an error where Python raises AssertionError.
assert_text_not_visiblecomposedLocatorExpect::to_contain_textpage.locator(selector).expect().not().to_contain_text(text); the wait is the expect timeout.
assert_titlecomposedPageExpect::to_have_titleAssert with page.expect().to_have_title(..); add .not() to negate and .timeout(d) to set the wait. A failed expectation returns an error where Python raises AssertionError.
assert_title_containscomposedPageExpect::to_contain_titleAssert with page.expect().to_contain_title(..); add .not() to negate and .timeout(d) to set the wait. A failed expectation returns an error where Python raises AssertionError.
assert_truenot-applicableRust has assert!, assert_eq! and friends.
assert_urlcomposedPageExpect::to_have_urlAssert with page.expect().to_have_url(..); add .not() to negate and .timeout(d) to set the wait. A failed expectation returns an error where Python raises AssertionError.
assert_url_containscomposedPageExpect::to_contain_urlAssert with page.expect().to_contain_url(..); add .not() to negate and .timeout(d) to set the wait. A failed expectation returns an error where Python raises AssertionError.
bring_active_window_to_frontcomposedPage::bring_to_frontA method of the Page that sb.cdp drives: page.bring_to_front(..).
check_if_uncheckedcomposedLocator::checkCall page.locator(selector).check(..); the Locator holds the selector, so it is not an argument of the call.
clearcomposedLocator::clearCall page.locator(selector).clear(..); the Locator holds the selector, so it is not an argument of the call.
clear_cookiescomposedCookies::clearpage.cookies().clear(..).
clear_inputcomposedLocator::clearCall page.locator(selector).clear(..); the Locator holds the selector, so it is not an argument of the call.
clickcomposedLocator::clickCall page.locator(selector).click(..); the Locator holds the selector, so it is not an argument of the call.
click_active_elementimplementedPage::click_active_elementpage.click_active_element() calls click() on document.activeElement. Differs: Does not pause for 0.2 seconds afterwards; wait for what the click causes with a Locator wait.
click_and_holdcomposedLocator::click_and_holdpage.locator(selector).click_and_hold(Duration::from_secs(2)) scrolls the element into view, presses at its centre, holds for the given time and releases there. Mouse::down and Mouse::up act at coordinates.
click_captchacomposedPage::solve_captchaA method of the Page that sb.cdp drives: page.solve_captcha(..).
click_if_visibleimplementedLocator::click_if_visiblepage.locator(selector).click_if_visible() clicks if the element is visible now (Python’s default timeout=0: look once) and says whether it clicked; click_if_visible_with_timeout(timeout) waits up to timeout for it. The Locator holds the selector, so it is not an argument of the call. Differs: Gives Ok(false) when the element is not visible in time or vanishes before the click; an invalid selector or a lost connection is still an error, where Python suppresses every error. The click always scrolls the element into view (scroll=True).
click_linkcomposedLocator::clickpage.locator(SelectorBuf::partial_link_text(link_text)).click() clicks the first link whose text contains link_text. The argument is link text, not a selector, so build the selector with SelectorBuf::partial_link_text (or link_text for an exact match) rather than passing the bare text.
click_nth_elementcomposedLocator::nthpage.locator(selector).nth(i).click(); nth is zero-based, Python’s number starts at 1.
click_nth_visible_elementcomposedLocator::nthpage.locator(selector).visible().nth(i).click(); nth is zero-based, Python’s number starts at 1.
click_visible_elementscomposedLocator::visiblepage.locator(selector).visible() narrows the Locator to the displayed matches; click each with nth.
click_with_offsetimplementedLocator::click_with_offsetpage.locator(selector).click_with_offset(x, y, center); the offset is from the element’s top-left corner, or from its centre when center is true, as in Python. click_at(Point) is the same call with center false and is deprecated. Differs: Always scrolls the element into view (Python’s scroll=True, its default).
close_active_tabcomposedPage::closepage.close() closes that Page’s tab.
download_fileimplementedPage::download_filepage.download_file(url, dir) has the page fetch the address and save the response, as Python does, then waits for the browser to finish and returns the saved path. page.download_by_click(selector, dir) follows a download that a click starts. Differs: Takes the folder to save in (Python uses ./downloaded_files) and waits for the browser’s own download events, bounded by the page timeout; a bad HTTP status, a fetch the page refuses (CORS) or a cancelled download is SeleniumBaseError::Download. The name comes from the Content-Disposition header when the server sends one, else from the address (Python: the address only).
drag_and_dropcomposedLocator::drag_toCall page.locator(selector).drag_to(..); the Locator holds the selector, so it is not an argument of the call.
enter_mfa_codecomposedBaseCase::enter_mfa_codeBaseCase::enter_mfa_code is a WebDriver-engine method; on the CDP engine compute the code with BaseCase::get_mfa_code and type it with Locator::type_text.
evaluatecomposedPage::evaluatepage.evaluate(script); values come back as serde_json::Value, so an element comes back as {}. As in Python, a return that starts the last line is dropped; a return anywhere else is a syntax error, so wrap such a script in (() => { ... })().
execute_scriptcomposedPage::evaluatepage.evaluate(script), as for evaluate: a return that starts the last line is dropped, so Selenium-style return document.title works; values come back as serde_json::Value.
fast_keyscomposedKeyboard::insert_textPython types into the element the selector names. Focus it first: page.locator(selector).focus().await?; page.keyboard().insert_text(text).await? inserts the text in one step after what the field holds. fast_type’s Locator::fill clears the field first.
fast_typecomposedLocator::fillpage.locator(selector).fill(text) replaces the content in one step, with input events but no per-key ones.
find_allcomposedLocator::all_waitingpage.locator(selector).all_waiting() waits up to the timeout for a first match, then gives one Locator per match; after the timeout it gives an empty list, as Python does. all() does not wait.
find_elementcomposedPage::locatorpage.locator(selector) returns a Locator, the handle every element action goes through; CSS, XPath and tag:contains("text") selectors work. Python also searches by text when the selector is plain text, which Rust does not guess: use SelectorBuf::containing_text. Python’s best_match option is not offered.
find_element_by_textcomposedSelectorBuf::containing_textpage.locator(SelectorBuf::containing_text(text, Some("button"))) finds a tag element whose text contains the text, as Python’s tag:contains("text") does (that form also works as a selector string); with None for the tag it finds the innermost elements that hold the text. A text= prefix still means link text, as in SeleniumBase.
find_elementscomposedLocator::all_waitingpage.locator(selector).all_waiting() waits up to the timeout for a first match, then gives one Locator per match; after the timeout it gives an empty list, as Python does. all() does not wait.
find_elements_by_textcomposedSelectorBuf::containing_textpage.locator(SelectorBuf::containing_text(text, tag)).all() gives one Locator per element that contains the text: the innermost ones when tag is None, every tag element otherwise.
find_visible_elementscomposedLocator::visibleCall page.locator(selector).visible(..); the Locator holds the selector, so it is not an argument of the call.
flashcomposedLocator::flash_withpage.locator(selector).flash_with(color, duration) outlines the element for the duration in any CSS colour; flash() uses the defaults. Python’s pause is a tokio::time::sleep afterwards. The outline is an outline, not Python’s vanishing dot.
focuscomposedLocator::focusCall page.locator(selector).focus(..); the Locator holds the selector, so it is not an argument of the call.
getcomposedPage::gotoA method of the Page that sb.cdp drives: page.goto(..).
get_active_elementcomposedPage::active_elementpage.active_element() returns a Locator for the element that has focus, found through its selector. Python returns a dump of the element; read what you need from the Locator (info(), text(), attribute(..)). page.evaluate("document.activeElement") does not work: an element comes back as {}.
get_active_element_csscomposedPage::active_element_csspage.active_element_css() returns the shortest selector that finds the focused element, such as input#email, or body when nothing has focus.
get_active_tabcomposedBrowser::default_pagePython’s active tab is the one the engine drives; in Rust that is the Page you hold. browser.default_page() is only the first tab listed, which may be another one.
get_all_cookiescomposedCookies::allpage.cookies().all(..).
get_all_urlscomposedLocator::urlspage.locator(selector).urls() lists the absolute URLs under the element.
get_attributecomposedLocator::attributeCall page.locator(selector).attribute(..); the Locator holds the selector, so it is not an argument of the call.
get_beautiful_soupnot-applicableHTML parsing lives in api::html (the scraper crate).
get_cookie_stringcomposedCookies::headerpage.cookies().header(..).
get_current_urlcomposedPage::urlA method of the Page that sb.cdp drives: page.url(..).
get_documentcomposedPage::executeRaw protocol call: page.execute(..) with DOM.getDocument.
get_element_attributecomposedLocator::attributeCall page.locator(selector).attribute(..); the Locator holds the selector, so it is not an argument of the call.
get_element_attributescomposedLocator::infopage.locator(selector).info() returns the element’s details, attributes included.
get_element_htmlcomposedLocator::htmlCall page.locator(selector).html(..); the Locator holds the selector, so it is not an argument of the call.
get_element_positioncomposedLocator::viewport_rectpage.locator(selector).viewport_rect() is measured from the window’s visible area, as in Python. bounding_box() is measured from the top of the document and differs by how far the page is scrolled.
get_element_rectcomposedLocator::viewport_rectpage.locator(selector).viewport_rect() is measured from the window’s visible area, as Python’s window-based rectangle is. bounding_box() is measured from the top of the document and differs by how far the page is scrolled.
get_element_sizecomposedLocator::bounding_boxpage.locator(selector).bounding_box(); position, size and rect all come from the one bounding box.
get_endpoint_urlcomposedBrowser::http_urlbrowser.http_url() is the DevTools HTTP endpoint, on the host the browser was launched on or attached to.
get_event_loopnot-applicableThe async runtime is the caller’s; there is no event loop to expose.
get_flattened_documentcomposedPage::executeRaw protocol call: page.execute(..) with DOM.getFlattenedDocument.
get_gui_element_centercomposedLocator::screen_rectpage.locator(selector).screen_rect() gives the rectangle in screen coordinates; take its centre.
get_gui_element_rectcomposedLocator::screen_rectCall page.locator(selector).screen_rect(..); the Locator holds the selector, so it is not an argument of the call.
get_htmlcomposedPage::contentpage.content() returns the whole page’s HTML, document.documentElement.outerHTML, which is what Python returns with include_shadow_dom=False. Python’s default (True) reads the html element’s outer HTML through DevTools; whether that adds shadow-root content was not compared. For one element use page.locator(selector).html().
get_local_storage_itemcomposedStorage::getpage.local_storage().get(key).
get_locale_codeimplementedPage::locale_codepage.locale_code() is navigator.language, or the first of navigator.languages when that is empty.
get_mfa_codecomposedBaseCase::get_mfa_codeBaseCase::get_mfa_code computes the TOTP code and needs no browser; it is a method of the WebDriver-engine BaseCase.
get_navigation_historycomposedPage::executeRaw protocol call: page.execute(..) with Page.getNavigationHistory.
get_nested_elementcomposedLocator::locatorCall page.locator(selector).locator(..); the Locator holds the selector, so it is not an argument of the call.
get_originimplementedPage::originpage.origin() is window.location.origin.
get_page_sourcecomposedPage::contentpage.content() returns the page’s HTML.
get_page_titlecomposedPage::titlepage.title().
get_parentcomposedLocator::parentCall page.locator(selector).parent(..); the Locator holds the selector, so it is not an argument of the call.
get_path_of_downloaded_filecomposedBrowser::set_download_dirRust has no helper: join the folder given to Browser::set_download_dir with the file name.
get_portcomposedBrowser::debugging_portbrowser.debugging_port().
get_rd_hostcomposedBrowser::debugging_hostbrowser.debugging_host() is 127.0.0.1 for a launched browser and the host given to Browser::connect for an attached one.
get_rd_portcomposedBrowser::debugging_portbrowser.debugging_port().
get_rd_urlcomposedBrowser::http_urlbrowser.http_url() is the DevTools HTTP endpoint, on the host the browser was launched on or attached to.
get_screen_rectimplementedPage::screen_rectpage.screen_rect() returns a ScreenRect of the display (window.screen): size, usable area and colour depth. page.window().bounds() is the browser window’s rectangle, not the screen’s, and Locator::screen_rect is an element’s rectangle in screen coordinates. Differs: Python returns the window.screen object as it serialises, a dict; this is a typed struct of the numeric fields.
get_session_storage_itemcomposedStorage::getpage.session_storage().get(key).
get_tabscomposedBrowser::pagesbrowser.pages().
get_textcomposedLocator::textCall page.locator(selector).text(..); the Locator holds the selector, so it is not an argument of the call.
get_titlecomposedPage::titlepage.title().
get_user_agentcomposedPage::user_agentpage.user_agent().
get_websocket_urlcomposedBrowser::websocket_urlbrowser.websocket_url().
get_windowcomposedWindow::boundspage.window().bounds(..); sizes and positions come as a WindowBounds struct instead of separate values.
get_window_positioncomposedWindow::boundspage.window().bounds(..); sizes and positions come as a WindowBounds struct instead of separate values.
get_window_rectcomposedWindow::boundspage.window().bounds(..); sizes and positions come as a WindowBounds struct instead of separate values.
get_window_sizecomposedWindow::boundspage.window().bounds(..); sizes and positions come as a WindowBounds struct instead of separate values.
go_backcomposedPage::backA method of the Page that sb.cdp drives: page.back(..).
go_forwardcomposedPage::forwardA method of the Page that sb.cdp drives: page.forward(..).
gotocomposedPage::gotoA method of the Page that sb.cdp drives: page.goto(..).
goto_if_not_urlcomposedPage::goto_if_not_urlpage.goto_if_not_url(url) navigates only when the tab is on another page. Like Python it ignores what a search engine adds after the query (?q=term&source=hp).
grant_all_permissionscomposedBrowser::grant_all_permissionsA method of the Browser, not of one page: browser.grant_all_permissions() grants the 23 kinds in Permission::ALL, which are the ones Python grants.
grant_permissionscomposedBrowser::grant_permissions_forA method of the Browser, not of one page: browser.grant_permissions(&[..]) for all origins, browser.grant_permissions_for(origin, &[..]) for one. Permissions are the Permission enum, not free-form names.
gui_click_and_holdcomposedGui::mouse_downFeature gui. Gui::mouse_down presses at the pointer’s current position without moving it, so move first: take let r = page.locator(selector).screen_rect().await?, gui.move_mouse(x, y)? to the centre (r.x + r.width / 2.0, r.y + r.height / 2.0), then gui.mouse_down()?, sleep for the hold time and gui.mouse_up()?.
gui_click_captchaimplementedPage::gui_click_captchaFeature gui. Page::gui_click_captcha finds the widget as Page::solve_captcha does, works out the checkbox’s screen point (the window from Browser.getWindowForTarget, where the page starts inside it, the widget’s frame, the vendor’s checkbox offset), moves the real pointer there along a human path and presses; the DataDome slider is dragged. Page::gui_captcha_plan gives the point without moving anything. It has unit and mock coverage only: the arithmetic, the vendor offsets, the CDP calls and the pointer steps are tested against a mocked browser and a recording pointer; it has never moved the real pointer or been tried on a live CAPTCHA. Differs: Python’s DataDome flow opens the challenge frame in a new tab and drags between the page’s own slider elements; here the handle is taken to be 30 pixels in from the frame’s left edge and is dragged to 30 pixels from its right edge. A headless browser and a minimised window are refused, and a point outside the main display is refused as PyAutoGUI refuses it.
gui_click_elementcomposedGui::clickFeature gui. Gui::click clicks where the pointer already is, so move first: let r = page.locator(selector).screen_rect().await?; gui.move_mouse((r.x + r.width / 2.0) as i32, (r.y + r.height / 2.0) as i32)?; gui.click()?. Python also glides the pointer over timeframe seconds.
gui_click_with_offsetcomposedGui::clickFeature gui. Move to the offset from the element’s top-left corner, then click: let r = page.locator(selector).screen_rect().await?; gui.move_mouse(r.x as i32 + dx, r.y as i32 + dy)?; gui.click()?.
gui_click_x_ycomposedGui::clickFeature gui. Gui::click does not move the pointer: gui.move_mouse(x, y)?; gui.click()?.
gui_drag_and_dropcomposedGui::dragFeature gui. Take the centre of page.locator(drag_selector).screen_rect().await? and of the drop selector’s, and pass both points to gui.drag((x1, y1), (x2, y2))?.
gui_drag_drop_pointscomposedGui::dragGui::drag from api::gui (feature gui): it moves the real pointer and keyboard in screen coordinates, outside the page.
gui_hover_and_clickcomposedGui::clickFeature gui. Move to the centre of the first element’s screen_rect() and wait for the page to react, then move to the centre of the second’s and gui.click()?.
gui_hover_elementcomposedGui::move_mouseFeature gui. Take the centre of page.locator(selector).screen_rect().await? and pass it to gui.move_mouse(x, y)?; the pointer is the operating system’s, outside the page.
gui_hover_x_ycomposedGui::move_mouseGui::move_mouse from api::gui (feature gui): it moves the real pointer and keyboard in screen coordinates, outside the page.
gui_move_to_elementcomposedGui::move_mouseFeature gui. Take the centre of page.locator(selector).screen_rect().await? and pass it to gui.move_mouse(x, y)?; the pointer is the operating system’s, outside the page.
gui_press_keycomposedGui::press_keyGui::press_key from api::gui (feature gui): it moves the real pointer and keyboard in screen coordinates, outside the page.
gui_press_keyscomposedGui::press_keysGui::press_keys(&[..]) holds the modifier keys while it presses the others; it needs feature gui.
gui_writecomposedGui::writeGui::write from api::gui (feature gui): it moves the real pointer and keyboard in screen coordinates, outside the page.
highlightcomposedLocator::flashpage.locator(selector).flash() outlines the element briefly; it has no loops or colour options.
highlight_overlaycomposedLocator::flashpage.locator(selector).flash() outlines the element briefly; it draws no overlay.
hover_and_clickcomposedLocator::hoverHover with page.locator(hover_selector).hover(), then click the second Locator: two calls instead of one.
hover_elementcomposedLocator::hoverpage.locator(selector).hover().
internalize_linkscomposedLocator::set_attributeSet target to _self on the link Locator with set_attribute so links open in the same tab.
is_attribute_presentcomposedLocator::attributepage.locator(selector).attribute(name) returns an Option; the attribute is present when it is Some.
is_checkedcomposedLocator::is_checkedCall page.locator(selector).is_checked(..); the Locator holds the selector, so it is not an argument of the call.
is_element_presentcomposedLocator::existsCall page.locator(selector).exists(..); the Locator holds the selector, so it is not an argument of the call.
is_element_visiblecomposedLocator::is_visibleCall page.locator(selector).is_visible(..); the Locator holds the selector, so it is not an argument of the call.
is_exact_text_visiblecomposedLocator::textCompare page.locator(selector).text() with the text; there is no single predicate.
is_onlinecomposedPage::is_onlineA method of the Page that sb.cdp drives: page.is_online(..).
is_selectedcomposedLocator::is_selectedpage.locator(selector).is_selected().
is_text_visiblecomposedLocator::textTest page.locator(selector).text() for the text; there is no single predicate.
js_dumpsnot-applicableValues cross as serde_json::Value; there is nothing to serialise by hand.
js_scroll_into_viewcomposedLocator::scroll_into_viewCall page.locator(selector).scroll_into_view(..); the Locator holds the selector, so it is not an argument of the call.
load_cookiescomposedCookies::loadpage.cookies().load(..).
maximizecomposedWindow::maximizepage.window().maximize().
medimizecomposedWindow::restorepage.window().restore() returns the window to its normal state.
minimizecomposedWindow::minimizepage.window().minimize().
mouse_clickcomposedLocator::clickpage.locator(selector).click() waits for the element, scrolls it into view and clicks its centre with real mouse events. page.mouse().click(point) clicks at coordinates instead.
nested_clickcomposedLocator::locatorCall page.locator(selector).locator(..); the Locator holds the selector, so it is not an argument of the call.
opencomposedPage::gotoA method of the Page that sb.cdp drives: page.goto(..).
open_new_tabcomposedBrowser::new_pageA method of the Browser, not of one page: browser.new_page() opens a blank tab and browser.new_page_at(url) one on a URL.
open_new_windowcomposedBrowser::new_windowA method of the Browser, not of one page: browser.new_window() opens a blank window and browser.new_window_at(url) one on a URL.
post_messageimplementedPage::post_messageMessenger shows its message as HTML, so the text is escaped and appears as typed. It loads Messenger first when the page lacks it. Differs: Python lets markup in the message through; here it is shown as text. Duration, pause and style are fields of MessageOptions.
press_keyscomposedLocator::send_keyspage.locator(selector).send_keys(text) types the text one key at a time, after what the field holds, without Python’s human-speed delays; Locator::press(Key) sends one named key.
print_to_pdfcomposedPage::pdfpage.pdf(..) returns the PDF; write it with std::fs.
quitcomposedBrowser::closebrowser.close() closes the whole browser.
refreshcomposedPage::reloadA method of the Page that sb.cdp drives: page.reload(..).
reloadcomposedPage::reloadA method of the Page that sb.cdp drives: page.reload(..).
remove_elementcomposedLocator::removepage.locator(selector).first().remove(). Python’s remove_element removes one element, the first match; Locator::remove on its own removes every match, which is remove_elements.
remove_elementscomposedLocator::removepage.locator(selector).remove() removes every match, as Python’s remove_elements does.
remove_from_domcomposedLocator::removepage.locator(selector).first().remove(). Python’s remove_from_dom removes one element, the first match; Locator::remove on its own removes every match.
reset_permissionscomposedBrowser::reset_permissionsA method of the Browser, not of one page: browser.reset_permissions(..).
reset_window_sizecomposedWindow::set_boundsRead page.window().bounds() when the page opens and pass those values back to set_bounds, as Python restores the start position and size. Window::restore only leaves the maximized or minimized state; it does not restore a size.
save_as_htmlcomposedPage::contentpage.content() returns the HTML; write it with std::fs.
save_as_html_to_logscomposedPage::contentpage.content() returns the HTML; write it into artifacts::ensure_latest_logs_dir() with std::fs.
save_as_pdfcomposedPage::pdfpage.pdf(..) returns the PDF; write it with std::fs.
save_as_pdf_to_logscomposedPage::pdfpage.pdf(..) returns the PDF; write it into artifacts::ensure_latest_logs_dir() with std::fs.
save_cookiescomposedCookies::savepage.cookies().save(..).
save_data_to_logsnot-applicableWrite files with std::fs; artifacts::ensure_latest_logs_dir gives the logs folder.
save_file_asimplementedPage::save_file_aspage.save_file_as(url, path) downloads the address like download_file, saves it at exactly path (creating the folders, replacing a file there) and returns that path. Differs: Takes a whole path, where Python takes a new file name and saves in ./downloaded_files.
save_page_sourcecomposedPage::contentpage.content() returns the HTML; write it with std::fs.
save_page_source_to_logscomposedPage::contentpage.content() returns the HTML; write it into artifacts::ensure_latest_logs_dir() with std::fs.
save_screenshotcomposedPage::screenshotpage.screenshot(..) returns the viewport as image bytes; write them with std::fs. For Python’s selector argument use page.locator(selector).screenshot().
save_screenshot_to_logscomposedPage::screenshotpage.screenshot(..) returns the image; write it into artifacts::ensure_latest_logs_dir() with std::fs.
scroll_by_ycomposedPage::scrollA method of the Page that sb.cdp drives: page.scroll(..).
scroll_downcomposedPage::scrollA method of the Page that sb.cdp drives: page.scroll(..).
scroll_into_viewcomposedLocator::scroll_into_viewCall page.locator(selector).scroll_into_view(..); the Locator holds the selector, so it is not an argument of the call.
scroll_to_bottomcomposedPage::scrollA method of the Page that sb.cdp drives: page.scroll(..).
scroll_to_topcomposedPage::scrollA method of the Page that sb.cdp drives: page.scroll(..).
scroll_to_ycomposedPage::scrollA method of the Page that sb.cdp drives: page.scroll(..).
scroll_upcomposedPage::scrollA method of the Page that sb.cdp drives: page.scroll(..).
selectcomposedLocator::select_optionCall page.locator(selector).select_option(..); the Locator holds the selector, so it is not an argument of the call.
select_allcomposedLocator::all_waitingPython’s select_all returns the matching elements, like find_elements; page.locator(selector).all_waiting() waits up to the timeout for a first match, then gives one Locator per match (an empty list after the timeout, as Python does). all() does not wait.
select_if_unselectedcomposedLocator::set_checkedpage.locator(selector).set_checked(true).
select_option_by_indexcomposedLocator::select_optionCall page.locator(selector).select_option(..); the Locator holds the selector, so it is not an argument of the call.
select_option_by_textcomposedLocator::select_optionCall page.locator(selector).select_option(..); the Locator holds the selector, so it is not an argument of the call.
select_option_by_valuecomposedLocator::select_optionCall page.locator(selector).select_option(..); the Locator holds the selector, so it is not an argument of the call.
send_keysimplementedLocator::send_keyspage.locator(selector).send_keys(text) types one key at a time after what the field holds; type_text clears first.
set_all_cookiescomposedCookies::setpage.cookies().set(..).
set_attributescomposedLocator::set_attributeCall page.locator(selector).set_attribute(..); the Locator holds the selector, so it is not an argument of the call.
set_download_pathcomposedBrowser::set_download_dirbrowser.set_download_dir(dir).
set_local_storage_itemcomposedStorage::setpage.local_storage().set(key, value).
set_localecomposedEmulation::localepage.emulation().locale(..) sets the Intl locale and also the language the page reads from navigator.language and the browser sends in Accept-Language, keeping the user agent and client hints it had. As in Python the language takes effect from the next page load.
set_messenger_themeimplementedPage::set_messenger_themeTheme, location and the message limit are typed in MessengerSettings; the defaults are Python’s (flat, bottom right, 8). A MessengerTheme or a MessengerLocation alone is accepted too and keeps the defaults for the rest.
set_session_storage_itemcomposedStorage::setpage.session_storage().set(key, value).
set_valuecomposedLocator::set_valueCall page.locator(selector).set_value(..); the Locator holds the selector, so it is not an argument of the call.
set_window_rectcomposedWindow::set_boundspage.window().set_bounds(x, y, width, height); it first restores a minimised or maximised window.
sleepnot-applicableUse tokio::time::sleep.
solve_captchacomposedPage::solve_captchaA method of the Page that sb.cdp drives: page.solve_captcha(..).
stopcomposedBrowser::closebrowser.close() closes the whole browser.
submitcomposedLocator::submitCall page.locator(selector).submit(..); the Locator holds the selector, so it is not an argument of the call.
switch_to_newest_tabcomposedBrowser::newest_pagebrowser.newest_page() returns the Page of the newest tab.
switch_to_newest_windowcomposedBrowser::newest_pagebrowser.newest_page() returns the Page of the newest window.
switch_to_tabcomposedBrowser::pagesPick a page from browser.pages(); Rust holds a Page per tab, so there is no current tab to switch.
switch_to_windowcomposedBrowser::pagesPick a page from browser.pages(); Rust holds a Page per tab, so there is no current window to switch.
tile_windowscomposedWindow::set_boundsPython tiles the browser windows with the CDP driver. Compute each tile’s x, y, width and height and call set_bounds on each window; there is no one-call tiler.
typeimplementedLocator::type_textpage.locator(selector).type_text(text) clears the field, then types the text one key at a time, as Python’s type does. fill(text) inserts it in one step; send_keys(text) appends.
uncheck_if_checkedcomposedLocator::uncheckCall page.locator(selector).uncheck(..); the Locator holds the selector, so it is not an argument of the call.
unselect_if_selectedcomposedLocator::set_checkedpage.locator(selector).set_checked(false).
wait_for_any_of_elements_presentcomposedPage::wait_for_anypage.wait_for_any(..) waits until one of several locators is ready and says which one (an index), not its selector.
wait_for_any_of_elements_visiblecomposedPage::wait_for_anypage.wait_for_any(..) waits until one of several locators is ready and says which one (an index), not its selector.
wait_for_elementcomposedLocator::wait_forCall page.locator(selector).wait_for(..); the Locator holds the selector, so it is not an argument of the call.
wait_for_element_absentcomposedLocator::wait_forCall page.locator(selector).wait_for(..); the Locator holds the selector, so it is not an argument of the call.
wait_for_element_not_visiblecomposedLocator::wait_forCall page.locator(selector).wait_for(..); the Locator holds the selector, so it is not an argument of the call.
wait_for_element_presentcomposedLocator::wait_forCall page.locator(selector).wait_for(..); the Locator holds the selector, so it is not an argument of the call.
wait_for_element_visiblecomposedLocator::wait_forCall page.locator(selector).wait_for(..); the Locator holds the selector, so it is not an argument of the call.
wait_for_textcomposedLocatorExpect::to_contain_textpage.locator(selector).expect().to_contain_text(text) waits for the text; it does not return the element.
wait_for_text_not_visiblecomposedLocatorExpect::to_contain_textpage.locator(selector).expect().not().to_contain_text(text) waits for the text to go.

Command-line commands#

Python seleniumbase / sbase; Rust sbrs.

UpstreamStatusRustNotes
behave-guiimplementedsbrs behave-guiTerminal UI instead of Tkinter (feature tui): lists the .feature files with their scenarios, runs the ones you mark through the crate’s behave runner and shows the results; without tui it prints a hint and exits with status 2, as sbrs commander does. --new keeps the earlier prompt that writes a new feature file. Differs: Python starts python -m behave with the browser, session, demo, dashboard, headless, screenshot and extra options. Here the only run option is a tag filter, and the steps are the built-in ones: steps written in Rust cannot be loaded, so a scenario that uses one is reported as undefined.
behave-optionsnot-applicableLists behave (Python BDD) options; this crate has its own Gherkin runner.
case-plansimplementedsbrs caseplansAlias of caseplans upstream; terminal UI instead of Tkinter, as for sbrs caseplans, and sbrs case-plans is an alias of it here too.
caseplansimplementedsbrs caseplansTerminal UI instead of Tkinter (feature tui): lists the Rust test functions under a folder, creates, edits and saves case_plans/<test>.md for each and writes case_summary.md; without tui it prints a hint and exits with status 2, as sbrs commander does. --starter keeps the earlier command that writes a fixed CASE_PLANS.md checklist. Differs: Python lists what pytest collects (file.py::Class::method); here the test functions are found by reading the files, so a #[test] inside a string looks like a test. Plans and the summary are written with LF line ends, not CRLF.
codegencomposedsbrs recordsbrs record URL -o FILE writes the recorded actions as a JSON or YAML list that sbrs replay runs. It does not write a test file; ActionRecorder::to_rust_test does that, from code.
commanderimplementedsbrs commander
convertimplementedsbrs convert
decryptimplementedsbrs decryptDiffers: Reads tokens made by sbrs encrypt only; see encrypt.
downloadnot-applicablePython’s download server fetches the Selenium Standalone Server. sbrs never downloads it: sbrs grid-hub and sbrs grid-node run a jar you supply with —jar or SB_SELENIUM_SERVER_JAR. (sbrs download-file downloads a file from a URL, which is another command.)
encryptimplementedsbrs encryptDiffers: AES-256-GCM under a PBKDF2 key from SB_ENCRYPTION_KEY, not Python’s fixed-key obfuscation; tokens are not interchangeable.
extract-objectsnot-applicableEdits the structure of Python test files.
getimplementedsbrs getAn alias of sbrs install, as in Python: sbrs get chromedriver|geckodriver|edgedriver [VERSION] (also firefoxdriver and msedgedriver). chromedriver and edgedriver default to the driver for the installed Chrome and Edge, geckodriver to the newest GitHub release; VERSION is latest, a major version or a full build (a geckodriver version such as 0.36.0). Each driver goes to downloaded_drivers/<driver>-<version>/. Differs: No --path: the driver stays in downloaded_drivers/ and is not copied to a folder on the PATH. Chrome for Testing and chrome-headless-shell are not fetched by name here; they are fetched when a session chooses one of them as the browser.
grid-hubimplementedsbrs grid-hubstart, stop, restart and status; needs a Selenium Server jar you supply and Java, and downloads nothing.
grid-nodeimplementedsbrs grid-nodestart, stop, restart and status; registers with the hub named by —hub.
guicomposedsbrs commanderPython’s gui is the same test runner as commander.
gui-behaveimplementedsbrs behave-guiAlias of behave-gui upstream; terminal UI instead of Tkinter, as for sbrs behave-gui, and sbrs gui-behave is an alias of it here too.
helpcomposedusageProvided by the argument parser.
inject-objectsnot-applicableEdits the structure of Python test files.
installimplementedsbrs installsbrs install chromedriver|geckodriver|edgedriver [VERSION]; with no argument it fetches the chromedriver that matches the installed Chrome (or the stable one). The same command as sbrs get. Differs: No --path: the driver stays in downloaded_drivers/ and is not copied to a folder on the PATH.
methodsnot-applicableLists Python methods; use cargo doc or docs/parity.md for the Rust API.
mkchartimplementedsbrs mkchart
mkdirimplementedsbrs mkdir
mkfileimplementedsbrs mkfile
mkpresimplementedsbrs mkpres
mkreccomposedsbrs recordPython’s mkrec creates a new test file with the Recorder. sbrs record URL -o FILE records in a browser and writes a JSON or YAML action list that sbrs replay runs, not a test file; sbrs mkrec only writes a starter recording file and opens no browser.
obfuscatecomposedsbrs encryptAlias of encrypt upstream, as here: sbrs obfuscate is accepted. It encrypts a string, not a source file. Tokens are AES-256-GCM under SB_ENCRYPTION_KEY, read from the environment instead of a prompt, and do not interchange with Python’s.
objectifynot-applicablePython’s objectify rewrites the selectors of a Python test file into page-object variables, like extract-objects and inject-objects, and there is no Python source to rewrite here. sbrs objectify only writes a starter page_object.rs.
optionsnot-applicableLists pytest options; Rust settings are fields of BrowserConfig and RuntimeConfig.
printimplementedsbrs print
proxyimplementedsbrs proxy
recordimplementedsbrs record
recordercomposedsbrs recordPython’s recorder is a desktop app that launches the Recorder. sbrs record URL -o FILE has no window of its own: it opens the page, records until it is stopped, and writes a JSON or YAML action list that sbrs replay runs. It does not write a test file.
revert-objectsnot-applicableEdits the structure of Python test files.
translateimplementedsbrs translatesbrs translate FILE LANGUAGE [—print|—overwrite|—copy] rewrites the action of every step of a JSON scenario with the translation dictionary; Scenario::from_json reads actions in any of the ten languages. Differs: Python translates the method calls of a Python test file. A Rust test is compiled code with English method names, so the file translated here is the JSON scenario. The language is a positional argument, not a —zh style flag.
unobfuscatecomposedsbrs decryptAlias of decrypt upstream, as here: sbrs unobfuscate is accepted. Tokens are AES-256-GCM under SB_ENCRYPTION_KEY, read from the environment instead of a prompt, and do not interchange with Python’s.
versionimplementedsbrs versionPrints the same line as sbrs --version.

pytest options#

Python --option flags.

UpstreamStatusRustNotes
--accountnot-applicableHands a free-text account string to pytest tests as sb.account; a Rust test reads its own values from std::env or a fixture file.
--ad-blockcomposedBrowserConfig::ad_blocksbrs --ad-block sets BrowserConfig::ad_block. Refuses the requests of the ad and tracker hosts of an AdBlockList (the built-in list, or the one set with BrowserConfig::with_ad_block_list) with Network.setBlockedURLs, which a WebDriver session sends through chromedriver’s DevTools channel when it connects and for each window it switches to. Works in a Chromium WebDriver session (Chrome, Chromium, Edge, Brave, Comet, Opera, Chrome for Testing, chrome-headless-shell); Firefox, Safari and Internet Explorer have no DevTools channel through WebDriver and block nothing. The pure CDP engine blocks hosts with LaunchOptionsBuilder::ad_block. Python hides the ad elements of a loaded page, which BaseCase::ad_block does when called. A URL that names a port is not matched, and a frame of another site is not stopped from loading and its own requests are not blocked (a frame of the page’s own site is). Checked in a real Chrome 155 with chromedriver 155 on macOS (tests/ad_block_chrome.rs).
--ad_blockcomposedBrowserConfig::ad_blockA Python spelling of —ad-block; sbrs takes —ad-block, and BrowserConfig::ad_block is the same setting. Refuses the requests of the ad and tracker hosts of an AdBlockList (the built-in list, or the one set with BrowserConfig::with_ad_block_list) with Network.setBlockedURLs, which a WebDriver session sends through chromedriver’s DevTools channel when it connects and for each window it switches to. Works in a Chromium WebDriver session (Chrome, Chromium, Edge, Brave, Comet, Opera, Chrome for Testing, chrome-headless-shell); Firefox, Safari and Internet Explorer have no DevTools channel through WebDriver and block nothing. The pure CDP engine blocks hosts with LaunchOptionsBuilder::ad_block. Python hides the ad elements of a loaded page, which BaseCase::ad_block does when called. A URL that names a port is not matched, and a frame of another site is not stopped from loading and its own requests are not blocked (a frame of the page’s own site is). Checked in a real Chrome 155 with chromedriver 155 on macOS (tests/ad_block_chrome.rs).
--adblockcomposedBrowserConfig::ad_blockA Python spelling of —ad-block; sbrs takes —ad-block, and BrowserConfig::ad_block is the same setting. Refuses the requests of the ad and tracker hosts of an AdBlockList (the built-in list, or the one set with BrowserConfig::with_ad_block_list) with Network.setBlockedURLs, which a WebDriver session sends through chromedriver’s DevTools channel when it connects and for each window it switches to. Works in a Chromium WebDriver session (Chrome, Chromium, Edge, Brave, Comet, Opera, Chrome for Testing, chrome-headless-shell); Firefox, Safari and Internet Explorer have no DevTools channel through WebDriver and block nothing. The pure CDP engine blocks hosts with LaunchOptionsBuilder::ad_block. Python hides the ad elements of a loaded page, which BaseCase::ad_block does when called. A URL that names a port is not matched, and a frame of another site is not stopped from loading and its own requests are not blocked (a frame of the page’s own site is). Checked in a real Chrome 155 with chromedriver 155 on macOS (tests/ad_block_chrome.rs).
--agentcomposedBrowserConfig::user_agent
--all-scriptsnot-applicableMakes pytest collect SB(), DriverContext() and Driver() scripts as tests; cargo test runs only #[test] functions, so there is no collection phase to extend.
--all_scriptsnot-applicableMakes pytest collect SB(), DriverContext() and Driver() scripts as tests; cargo test runs only #[test] functions, so there is no collection phase to extend.
--archive-downloadsnot-applicableDownloads go to the OS Downloads folder (BaseCase::get_downloads_folder) and are never cleared, so there is no project downloaded_files folder to archive; moving the user’s Downloads would be unsafe.
--archive-logsnot-applicableThis crate never deletes latest_logs/ (artifacts::ensure_latest_logs_dir only creates it), so there are no deleted old logs to archive instead.
--archive_downloadsnot-applicableDownloads go to the OS Downloads folder (BaseCase::get_downloads_folder) and are never cleared, so there is no project downloaded_files folder to archive; moving the user’s Downloads would be unsafe.
--archive_logsnot-applicableThis crate never deletes latest_logs/ (artifacts::ensure_latest_logs_dir only creates it), so there are no deleted old logs to archive instead.
--auto-extimplementedBrowserConfig::with_automation_extensionSets useAutomationExtension to true. Upstream marks the option deprecated. Chromium only.
--binary-locationcomposedBrowserConfig::browser_binary_path
--binary_locationcomposedBrowserConfig::browser_binary_path
--blcomposedBrowserConfig::browser_binary_path
--block-adscomposedBrowserConfig::ad_blockA Python spelling of —ad-block; sbrs takes —ad-block, and BrowserConfig::ad_block is the same setting. Refuses the requests of the ad and tracker hosts of an AdBlockList (the built-in list, or the one set with BrowserConfig::with_ad_block_list) with Network.setBlockedURLs, which a WebDriver session sends through chromedriver’s DevTools channel when it connects and for each window it switches to. Works in a Chromium WebDriver session (Chrome, Chromium, Edge, Brave, Comet, Opera, Chrome for Testing, chrome-headless-shell); Firefox, Safari and Internet Explorer have no DevTools channel through WebDriver and block nothing. The pure CDP engine blocks hosts with LaunchOptionsBuilder::ad_block. Python hides the ad elements of a loaded page, which BaseCase::ad_block does when called. A URL that names a port is not matched, and a frame of another site is not stopped from loading and its own requests are not blocked (a frame of the page’s own site is). Checked in a real Chrome 155 with chromedriver 155 on macOS (tests/ad_block_chrome.rs).
--block-imagesimplementedBrowserConfig::with_block_imagesChrome’s content-setting preference (prefs of goog:chromeOptions), or Firefox’s permissions.default.image.
--block_adscomposedBrowserConfig::ad_blockA Python spelling of —ad-block; sbrs takes —ad-block, and BrowserConfig::ad_block is the same setting. Refuses the requests of the ad and tracker hosts of an AdBlockList (the built-in list, or the one set with BrowserConfig::with_ad_block_list) with Network.setBlockedURLs, which a WebDriver session sends through chromedriver’s DevTools channel when it connects and for each window it switches to. Works in a Chromium WebDriver session (Chrome, Chromium, Edge, Brave, Comet, Opera, Chrome for Testing, chrome-headless-shell); Firefox, Safari and Internet Explorer have no DevTools channel through WebDriver and block nothing. The pure CDP engine blocks hosts with LaunchOptionsBuilder::ad_block. Python hides the ad elements of a loaded page, which BaseCase::ad_block does when called. A URL that names a port is not matched, and a frame of another site is not stopped from loading and its own requests are not blocked (a frame of the page’s own site is). Checked in a real Chrome 155 with chromedriver 155 on macOS (tests/ad_block_chrome.rs).
--block_imagesimplementedBrowserConfig::with_block_imagesChrome’s content-setting preference (prefs of goog:chromeOptions), or Firefox’s permissions.default.image.
--braveimplementedBrowserConfig::browserRun with chromedriver; the program is found in Brave’s install locations or on the PATH.
--browserimplementedBrowserConfig::browser
--cap-fileimplementedCapabilityOverrides::from_fileReads JSON or the Python dictionary of a capabilities file without running Python; merged over the session’s capabilities with BrowserConfig::with_capabilities. Differs: Python’s parser reads one key per line; this reads the whole dictionary.
--cap-stringimplementedCapabilityOverrides::from_textJSON, or a Python dictionary; merged over the session’s capabilities with BrowserConfig::with_capabilities.
--cap_fileimplementedCapabilityOverrides::from_fileReads JSON or the Python dictionary of a capabilities file without running Python; merged over the session’s capabilities with BrowserConfig::with_capabilities. Differs: Python’s parser reads one key per line; this reads the whole dictionary.
--cap_stringimplementedCapabilityOverrides::from_textJSON, or a Python dictionary; merged over the session’s capabilities with BrowserConfig::with_capabilities.
--cftimplementedBrowserConfig::browserChrome for Testing, downloaded into downloaded_drivers/cft/ when missing; the driver follows its version.
--check-jscomposedBaseCase::assert_no_js_errorsCall it after the page loads.
--check_jscomposedBaseCase::assert_no_js_errorsCall it after the page loads.
--chromecomposedBrowserConfig::browserChoose the Browser variant.
--chromiumcomposedBrowserConfig::browserChoose the Browser variant.
--chromium-argcomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--chromium_argcomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--chsimplementedBrowserConfig::browserchrome-headless-shell, downloaded into downloaded_drivers/chs/ when missing; it cannot run UC mode.
--codegencomposedRecorderSession::installRecorderSession::install(&sb) injects the page recorder, so clicks and typing done by hand in the browser are captured; drain(&mut sb) collects them, and ActionRecorder::to_rust_test or save_recording_as_test writes the test. Nothing is saved when the test ends. BaseCase::start_recording only marks where the log of the test’s own BaseCase calls begins.
--cometimplementedBrowserConfig::browserRun with chromedriver; the program is found in Comet’s install locations or on the PATH (the Linux location is a guess).
--crumbscomposedBaseCase::delete_all_cookiesWith —reuse-session or —rcs, a browser handed to the next test always has its cookies deleted (every cookie, through DevTools, on Chromium) and goes to about:blank, so —crumbs is in effect whenever a browser is reused. Without reuse every test has a new browser and no cookies; call delete_all_cookies to clear them within a test.
--crximplementedBrowserConfig::with_extension_archiveA .zip or .crx file, sent in the extensions option of goog:chromeOptions. Chromium only.
--darkcomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--dark-modecomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--dark_modecomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--dash-titlenot-applicableSets the title of the pytest session dashboard page; write_dashboard_html takes its title from the scenario’s name.
--dash_titlenot-applicableSets the title of the pytest session dashboard page; write_dashboard_html takes its title from the scenario’s name.
--dashboardnot-applicableTurns on the live dashboard.html that the pytest session rewrites during a run; a scenario run writes a static report with write_dashboard_html instead.
--datanot-applicablePasses one free-text string through the pytest command line as self.data; a Rust test reads its own values from std::env or a fixture file.
--database-envnot-applicablePicks which MySQL reporting database —with-db-reporting writes to; ResultStore is a local database opened from a path the caller gives, so there are no named environments.
--database_envnot-applicablePicks which MySQL reporting database —with-db-reporting writes to; ResultStore is a local database opened from a path the caller gives, so there are no named environments.
--dcspimplementedBrowserConfig::with_disable_cspLoads the bundled Disable CSP extension, which removes the Content-Security-Policy headers. Chromium only.
--demoimplementedRunSettings::with_demo_modeOutlines the element and pauses after the actions Python’s demo mode covers (open, the clicks, typing, the selects, submit, focus, drag and drop, the window size calls and more); a pause is full after an action that changed the URL and 1/3.4 of it after one that did not; hand the settings to BaseCase::set_run_settings.
--demo-modeimplementedRunSettings::with_demo_modeOutlines the element and pauses after the actions Python’s demo mode covers (open, the clicks, typing, the selects, submit, focus, drag and drop, the window size calls and more); a pause is full after an action that changed the URL and 1/3.4 of it after one that did not; hand the settings to BaseCase::set_run_settings.
--demo-sleepimplementedRunSettings::with_demo_sleepThe pause demo and slow mode make after an action.
--demo_modeimplementedRunSettings::with_demo_modeOutlines the element and pauses after the actions Python’s demo mode covers (open, the clicks, typing, the selects, submit, focus, drag and drop, the window size calls and more); a pause is full after an action that changed the URL and 1/3.4 of it after one that did not; hand the settings to BaseCase::set_run_settings.
--demo_sleepimplementedRunSettings::with_demo_sleepThe pause demo and slow mode make after an action.
--device-metricsimplementedBrowserConfig::with_device_metricsChrome’s mobileEmulation experimental option. Differs: Python applies the metrics only together with —mobile; here setting them turns mobile emulation on.
--device_metricsimplementedBrowserConfig::with_device_metricsChrome’s mobileEmulation experimental option. Differs: Python applies the metrics only together with —mobile; here setting them turns mobile emulation on.
--devtoolscomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--disable-beforeunloadcomposedBaseCase::disable_beforeunloadCall it after each navigation.
--disable-cookiesimplementedBrowserConfig::with_disable_cookiesChrome’s cookie content-setting preference, or Firefox’s network.cookie.cookieBehavior.
--disable-cspimplementedBrowserConfig::with_disable_cspLoads the bundled Disable CSP extension, which removes the Content-Security-Policy headers. Chromium only.
--disable-featurescomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--disable-gpucomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--disable-jsimplementedBrowserConfig::with_disable_jsChrome’s JavaScript content-setting preference, or Firefox’s javascript.enabled.
--disable-web-securitycomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--disable-wscomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--disable_beforeunloadcomposedBaseCase::disable_beforeunloadCall it after each navigation.
--disable_cookiesimplementedBrowserConfig::with_disable_cookiesChrome’s cookie content-setting preference, or Firefox’s network.cookie.cookieBehavior.
--disable_cspimplementedBrowserConfig::with_disable_cspLoads the bundled Disable CSP extension, which removes the Content-Security-Policy headers. Chromium only.
--disable_featurescomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--disable_gpucomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--disable_jsimplementedBrowserConfig::with_disable_jsChrome’s JavaScript content-setting preference, or Firefox’s javascript.enabled.
--disable_wscomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--do-not-trackimplementedBrowserConfig::with_do_not_trackChrome’s enable_do_not_track preference, or Firefox’s privacy.donottrackheader.enabled.
--do_not_trackimplementedBrowserConfig::with_do_not_trackChrome’s enable_do_not_track preference, or Firefox’s privacy.donottrackheader.enabled.
--driver-versionimplementedBrowserConfig::with_driver_versionbrowser, latest, stable, beta, dev, canary, a major version or a full version. The driver goes to downloaded_drivers/chromedriver-<version>/, or msedgedriver-<version>/ for Edge. geckodriver takes no version here: one geckodriver drives many Firefox versions, and sbrs get geckodriver VERSION pins one.
--driver_versionimplementedBrowserConfig::with_driver_versionbrowser, latest, stable, beta, dev, canary, a major version or a full version. The driver goes to downloaded_drivers/chromedriver-<version>/, or msedgedriver-<version>/ for Edge. geckodriver takes no version here: one geckodriver drives many Firefox versions, and sbrs get geckodriver VERSION pins one.
--dwscomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--edgecomposedBrowserConfig::browserChoose Browser::Edge. The session starts msedgedriver itself, from downloaded_drivers/ or the PATH when it fits the installed Edge, else downloaded for that Edge from msedgedriver.microsoft.com; options go in ms:edgeOptions.
--eeimplementedBrowserConfig::with_esc_endAlso sbrs --esc-end (aliases --esc_end, --ee), Settings::esc_end and SB_ESC_END. BaseCase puts a keydown listener in the page that sets document.sb_esc_end, and open, click, click_link_text, highlight, wait_for_element_visible, wait_for_ready_state_complete and the demo highlight of type_text, update_text and press_keys return SeleniumBaseError::Skipped once ESC was pressed; run_browser_test counts that as a skipped test. Differs: Python assigns document.onkeydown, replacing the page’s own handler; the Rust listener is added once per document with addEventListener, so the page keeps its handlers. A script that fails (an open alert, no page) counts as ‘ESC not pressed’. Only the WebDriver engine (BaseCase) has the option.
--enable-3d-apiscomposedBrowserConfig::headlessPython adds —disable-3d-apis and —disable-gpu unless this is set. A Rust session never adds —disable-3d-apis, and adds —disable-gpu only when it is headless, so a headed session already has 3D APIs on. Differs: A headless session always adds —disable-gpu, and there is no option to leave it out.
--enable-syncimplementedBrowserConfig::with_enable_syncChrome Sync is switched off with --disable-sync unless this is set.
--enable-web-securitynot-applicablePython adds —disable-web-security unless this is set. A Rust session never adds it, so web security is already on and there is nothing to enable.
--enable-wsnot-applicablePython adds —disable-web-security unless this is set. A Rust session never adds it, so web security is already on and there is nothing to enable.
--enable_3d_apiscomposedBrowserConfig::headlessPython adds —disable-3d-apis and —disable-gpu unless this is set. A Rust session never adds —disable-3d-apis, and adds —disable-gpu only when it is headless, so a headed session already has 3D APIs on. Differs: A headless session always adds —disable-gpu, and there is no option to leave it out.
--enable_syncimplementedBrowserConfig::with_enable_syncChrome Sync is switched off with --disable-sync unless this is set.
--enable_wsnot-applicablePython adds —disable-web-security unless this is set. A Rust session never adds it, so web security is already on and there is nothing to enable.
--envnot-applicableNames the test environment (qa, prod, …) for the pytest plugin; this crate takes per-deploy configuration from SB_* environment variables (RuntimeConfig) instead.
--esc-endimplementedBrowserConfig::with_esc_endAlso sbrs --esc-end (aliases --esc_end, --ee), Settings::esc_end and SB_ESC_END. BaseCase puts a keydown listener in the page that sets document.sb_esc_end, and open, click, click_link_text, highlight, wait_for_element_visible, wait_for_ready_state_complete and the demo highlight of type_text, update_text and press_keys return SeleniumBaseError::Skipped once ESC was pressed; run_browser_test counts that as a skipped test. Differs: Python assigns document.onkeydown, replacing the page’s own handler; the Rust listener is added once per document with addEventListener, so the page keeps its handlers. A script that fails (an open alert, no page) counts as ‘ESC not pressed’. Only the WebDriver engine (BaseCase) has the option.
--esc_endimplementedBrowserConfig::with_esc_endAlso sbrs --esc-end (aliases --esc_end, --ee), Settings::esc_end and SB_ESC_END. BaseCase puts a keydown listener in the page that sets document.sb_esc_end, and open, click, click_link_text, highlight, wait_for_element_visible, wait_for_ready_state_complete and the demo highlight of type_text, update_text and press_keys return SeleniumBaseError::Skipped once ESC was pressed; run_browser_test counts that as a skipped test. Differs: Python assigns document.onkeydown, replacing the page’s own handler; the Rust listener is added once per document with addEventListener, so the page keeps its handlers. A script that fails (an open alert, no page) counts as ‘ESC not pressed’. Only the WebDriver engine (BaseCase) has the option.
--extension-dirimplementedBrowserConfig::extension_dir
--extension-zipimplementedBrowserConfig::with_extension_archiveA .zip or .crx file, sent in the extensions option of goog:chromeOptions. Chromium only.
--extension_dirimplementedBrowserConfig::extension_dir
--extension_zipimplementedBrowserConfig::with_extension_archiveA .zip or .crx file, sent in the extensions option of goog:chromeOptions. Chromium only.
--external-pdfimplementedBrowserConfig::with_external_pdfChrome’s plugins.always_open_pdf_externally, or Firefox’s pdfjs.disabled.
--external_pdfimplementedBrowserConfig::with_external_pdfChrome’s plugins.always_open_pdf_externally, or Firefox’s pdfjs.disabled.
--fastnot-applicablePython 4.55.2 reads —fast only in CDP mode, where it skips the 0.2 s wait after a click and the wait after opening a page; demo mode never checks it. This crate’s CDP engine makes neither wait, so there is nothing to skip. RunSettings::with_fast_mode is kept, deprecated, and does nothing.
--fast-modenot-applicablePython 4.55.2 reads —fast only in CDP mode, where it skips the 0.2 s wait after a click and the wait after opening a page; demo mode never checks it. This crate’s CDP engine makes neither wait, so there is nothing to skip. RunSettings::with_fast_mode is kept, deprecated, and does nothing.
--fast_modenot-applicablePython 4.55.2 reads —fast only in CDP mode, where it skips the 0.2 s wait after a click and the wait after opening a page; demo mode never checks it. This crate’s CDP engine makes neither wait, so there is nothing to skip. RunSettings::with_fast_mode is kept, deprecated, and does nothing.
--fdebugnot-applicableDrops into Python’s pdb at the end of each test; Rust has no pdb. Attach a debugger, or open Chrome’s debugger with BrowserConfig::with_remote_debug.
--final-debugnot-applicableDrops into Python’s pdb at the end of each test; Rust has no pdb. Attach a debugger, or open Chrome’s debugger with BrowserConfig::with_remote_debug.
--final-tracenot-applicableStarts Python’s pdb trace at the end of each test; Rust has no pdb. Attach a debugger, or open Chrome’s debugger with BrowserConfig::with_remote_debug.
--firefoxcomposedBrowserConfig::browserChoose Browser::Firefox. The session starts geckodriver itself, from downloaded_drivers/ or the PATH, else the newest release downloaded from GitHub; options go in moz:firefoxOptions.
--firefox-argimplementedFirefoxOptions::add_argsComma-separated; FirefoxOptions goes to BrowserConfig::with_firefox_options.
--firefox-prefimplementedFirefoxOptions::add_preferencesComma-separated NAME:VALUE; FirefoxOptions goes to BrowserConfig::with_firefox_options.
--firefox_argimplementedFirefoxOptions::add_argsComma-separated; FirefoxOptions goes to BrowserConfig::with_firefox_options.
--firefox_prefimplementedFirefoxOptions::add_preferencesComma-separated NAME:VALUE; FirefoxOptions goes to BrowserConfig::with_firefox_options.
--ftracenot-applicableStarts Python’s pdb trace at the end of each test; Rust has no pdb. Attach a debugger, or open Chrome’s debugger with BrowserConfig::with_remote_debug.
--fullscreencomposedBaseCase::maximize_windowAlias of —maximize upstream. Call maximize_window() once the session has started; it works for Firefox too. A session always starts with a —window-size, so —start-maximized alone is not relied on.
--guestcomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--guest-modecomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--guest_modecomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--guicomposedBrowserConfig::headlessHeaded is headless = false.
--headedcomposedBrowserConfig::headlessHeaded is headless = false.
--headlessimplementedBrowserConfig::headless
--headless1composedBrowserConfig::browserChrome’s old headless mode now exists only as chrome-headless-shell: choose Browser::ChromeHeadlessShell as the browser, with headless set. BrowserConfig::headless alone launches the new mode.
--headless2composedBrowserConfig::headlessheadless = true launches Chrome’s new headless mode (--headless=new), which is what headless2 asks for.
--highlightsnot-applicableBaseCase::highlight outlines the element once and restores it after about a second; it has no loop count for a —highlights option to override.
--host-resolver-rulescomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--host_resolver_rulescomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--ieimplementedBrowserConfig::browserRun with IEDriverServer, which must be in downloaded_drivers/ or on the PATH, on Windows.
--incognitocomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--incognito-modecomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--incognito_modecomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--intervalnot-applicableTour and Presentation here advance only when told, with no autoplay, so there is no interval to override.
--is-pytestnot-applicablepytest and unittest plumbing; the Rust test runner (api::runner) and RuntimeConfig replace it.
--is_pytestnot-applicablepytest and unittest plumbing; the Rust test runner (api::runner) and RuntimeConfig replace it.
--lfpnot-applicableA pytest report hook that prints the URL of each failing test; a Rust test prints BaseCase::get_current_url itself when it fails.
--list-fail-pagenot-applicableA pytest report hook that prints the URL of each failing test; a Rust test prints BaseCase::get_current_url itself when it fails.
--list-fail-pagesnot-applicableA pytest report hook that prints the URL of each failing test; a Rust test prints BaseCase::get_current_url itself when it fails.
--localeimplementedBrowserConfig::locale
--locale-codecomposedBrowserConfig::locale
--locale_codecomposedBrowserConfig::locale
--log-cdpimplementedBrowserConfig::with_cdp_eventsAsks the driver to keep the performance log; read it with BrowserSession::cdp_events.
--log-cdp-eventsimplementedBrowserConfig::with_cdp_eventsAsks the driver to keep the performance log; read it with BrowserSession::cdp_events.
--log-pathnot-applicableDeprecated upstream and no longer editable: logs always go to latest_logs/, as artifacts::ensure_latest_logs_dir does here.
--log_cdpimplementedBrowserConfig::with_cdp_eventsAsks the driver to keep the performance log; read it with BrowserSession::cdp_events.
--log_cdp_eventsimplementedBrowserConfig::with_cdp_eventsAsks the driver to keep the performance log; read it with BrowserSession::cdp_events.
--log_pathnot-applicableDeprecated upstream and no longer editable: logs always go to latest_logs/, as artifacts::ensure_latest_logs_dir does here.
--maximizecomposedBaseCase::maximize_windowCall maximize_window() once the session has started; it works for Firefox too. A session always starts with a —window-size, so —start-maximized alone is not relied on.
--maximize-windowcomposedBaseCase::maximize_windowCall maximize_window() once the session has started; it works for Firefox too. A session always starts with a —window-size, so —start-maximized alone is not relied on.
--maximize_windowcomposedBaseCase::maximize_windowCall maximize_window() once the session has started; it works for Firefox too. A session always starts with a —window-size, so —start-maximized alone is not relied on.
--message-durationimplementedRunSettings::with_message_durationHow long BaseCase::post_message keeps its message, to the millisecond (2.55 s by default, 0.75 s at most in a headless browser).
--message_durationimplementedRunSettings::with_message_durationHow long BaseCase::post_message keeps its message, to the millisecond (2.55 s by default, 0.75 s at most in a headless browser).
--metricsimplementedBrowserConfig::with_device_metricsChrome’s mobileEmulation experimental option. Differs: Python applies the metrics only together with —mobile; here setting them turns mobile emulation on.
--mobileimplementedBrowserConfig::mobile
--mobile-emulatorcomposedBrowserConfig::mobileGive the screen with with_device_metrics.
--mobile_emulatorcomposedBrowserConfig::mobileGive the screen with with_device_metrics.
--multi-proxycomposedLaunchOptionsBuilder::proxyEach pure CDP browser answers its own proxy login over the protocol, so browsers running in parallel can use different authenticated proxies with no switch. The WebDriver engine passes the proxy as a flag and cannot log in to one.
--multi_proxycomposedLaunchOptionsBuilder::proxyEach pure CDP browser answers its own proxy login over the protocol, so browsers running in parallel can use different authenticated proxies with no switch. The WebDriver engine passes the proxy as a flag and cannot log in to one.
--no-cspimplementedBrowserConfig::with_disable_cspLoads the bundled Disable CSP extension, which removes the Content-Security-Policy headers. Chromium only.
--no-sandboxcomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--no-screenshotnot-applicableNothing to turn off: this crate saves a screenshot only when a test or ScreenshotOnFailurePlugin asks for one.
--no_cspimplementedBrowserConfig::with_disable_cspLoads the bundled Disable CSP extension, which removes the Content-Security-Policy headers. Chromium only.
--no_sandboxcomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--no_screenshotnot-applicableNothing to turn off: this crate saves a screenshot only when a test or ScreenshotOnFailurePlugin asks for one.
--nsnot-applicableNothing to turn off: this crate saves a screenshot only when a test or ScreenshotOnFailurePlugin asks for one.
--open-devtoolscomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--open_devtoolscomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--operaimplementedBrowserConfig::browserRun with operadriver, which must be in downloaded_drivers/ or on the PATH; nothing downloads it.
--pac-urlcomposedBrowserConfig::proxy_pac_urlURL only: a WebDriver session cannot log in to a proxy, so USERNAME:PASSWORD@URL does not authenticate.
--page-load-strategyimplementedBrowserConfig::with_page_load_strategyThe pageLoadStrategy capability: normal, eager or none.
--page_load_strategyimplementedBrowserConfig::with_page_load_strategyThe pageLoadStrategy capability: normal, eager or none.
--plsimplementedBrowserConfig::with_page_load_strategyThe pageLoadStrategy capability: normal, eager or none.
--portcomposedBrowserConfig::webdriver_urlGive the full WebDriver URL instead of its parts.
--protocolcomposedBrowserConfig::webdriver_urlGive the full WebDriver URL instead of its parts.
--proxyimplementedBrowserConfig::proxyDiffers: SERVER:PORT only: a WebDriver session cannot log in to a proxy, so USER:PASS@SERVER:PORT does not authenticate. The pure CDP engine can (LaunchOptionsBuilder::proxy).
--proxy-bypass-listimplementedBrowserConfig::with_proxy_bypass_listChrome’s --proxy-bypass-list. It applies to a proxy named with proxy, not to a PAC file.
--proxy-driverimplementedBrowserConfig::with_proxy_for_driver_downloadDownloads of the driver, and of the Chrome for Testing builds, go through the session’s proxy.
--proxy-pac-urlimplementedBrowserConfig::proxy_pac_urlDiffers: URL only: a WebDriver session cannot log in to a proxy, so USERNAME:PASSWORD@URL does not authenticate.
--proxy-servercomposedBrowserConfig::proxySERVER:PORT only. A WebDriver session hands the address to Chrome as a flag, Chrome ignores credentials in it, and the engine does not answer the proxy’s login request, so USER:PASS@SERVER:PORT does not log in. For a proxy that needs a password use the pure CDP engine (LaunchOptionsBuilder::proxy).
--proxy-stringcomposedBrowserConfig::proxySERVER:PORT only. A WebDriver session hands the address to Chrome as a flag, Chrome ignores credentials in it, and the engine does not answer the proxy’s login request, so USER:PASS@SERVER:PORT does not log in. For a proxy that needs a password use the pure CDP engine (LaunchOptionsBuilder::proxy).
--proxy_bypass_listimplementedBrowserConfig::with_proxy_bypass_listChrome’s --proxy-bypass-list. It applies to a proxy named with proxy, not to a PAC file.
--proxy_driverimplementedBrowserConfig::with_proxy_for_driver_downloadDownloads of the driver, and of the Chrome for Testing builds, go through the session’s proxy.
--rcsimplementedBrowserConfig::with_reuse_module_sessionAlias of —reuse-class-session upstream. Also sbrs --rcs (aliases --reuse-class-session, --reuse_class_session), Settings::reuse_class_session and SB_REUSE_CLASS_SESSION; like upstream it turns —reuse-session on. Rust has no test classes, so the module that holds the test plays the part: it is read from the name libtest gives the test’s thread (login::tests::valid is in login::tests; the tests at the root of an integration test file share the root module). BrowserConfig::with_reuse_class_session(name) shares a browser among the tests that pass the same name instead. Tests of different classes never share a browser; the rest is as for —reuse-session. Differs: Python quits the class’s browser when the next class starts (setUpClass and tearDownClass); here it stays open until the idle timeout, so the browsers of several modules can be open at once. A BaseCase made outside a libtest thread (a custom harness, a spawned task on a Tokio worker) counts as the root module.
--reccomposedRecorderSession::installRecorderSession::install(&sb) injects the page recorder, so clicks and typing done by hand in the browser are captured; drain(&mut sb) collects them, and ActionRecorder::to_rust_test or save_recording_as_test writes the test. Nothing is saved when the test ends. BaseCase::start_recording only marks where the log of the test’s own BaseCase calls begins.
--rec-behaveimplementedActionRecorder::to_gherkinWrites a feature for the common browser steps; save_recording_as_feature saves it.
--rec-gherkinimplementedActionRecorder::to_gherkinWrites a feature for the common browser steps; save_recording_as_feature saves it.
--rec-printcomposedBaseCase::export_recording_as_rustPrint the returned text.
--rec-sb-cdpimplementedBrowserConfig::with_rec_sb_cdpAlso sbrs --rec-sb-cdp (alias --rec_sb_cdp), Settings::rec_sb_cdp and SB_REC_SB_CDP. With it on, BaseCase::export_recording_as_rust (and so save_recording_to_logs, sbrs run-scenario, sbrs export-recording and the save command of record_live_session) returns ActionRecorder::to_cdp_script: a #[tokio::main] program of sb_cdp Page and Locator calls, every selector and value a Rust string literal. to_cdp_test and save_recording_as_cdp_test write a test; BaseCase::export_recording_as_cdp_rust asks for it whatever the setting is. 51 recorded actions have a pure CDP call, and the program written for all of them is compiled against the real sb_cdp API by tests/recorder_cdp_compiles.rs; any other action becomes a // skipped: comment that quotes its BaseCase call. Differs: Python writes the recording file when the test ends; here it is written when export_recording_as_rust, save_recording_to_logs or a CLI command asks. The test itself still runs on WebDriver, and the generated program launches a pure CDP Browser. Waits use the pure CDP engine’s own timeout, not ten seconds, and actions with no pure CDP call (frame, window and alert switching, JavaScript clicks, set_window_size) are comments, where Python comments out the actions CDPMethods lacks.
--rec-sb-mgrcomposedActionRecorder::to_rust_scriptPython’s with SB() as sb: form is a standalone script. ActionRecorder::to_rust_script writes the recording as a standalone #[tokio::main] Rust program (BaseCase::export_recording_as_rust returns it); to_rust_test writes a test instead.
--rec-sleepimplementedRunSettings::with_record_sleepBaseCase::sleep goes into the recording, and the generated Rust calls sb.sleep.
--recordcomposedRecorderSession::installRecorderSession::install(&sb) injects the page recorder, so clicks and typing done by hand in the browser are captured; drain(&mut sb) collects them, and ActionRecorder::to_rust_test or save_recording_as_test writes the test. Nothing is saved when the test ends. BaseCase::start_recording only marks where the log of the test’s own BaseCase calls begins.
--record-sleepimplementedRunSettings::with_record_sleepBaseCase::sleep goes into the recording, and the generated Rust calls sb.sleep.
--recordercomposedRecorderSession::installRecorderSession::install(&sb) injects the page recorder, so clicks and typing done by hand in the browser are captured; drain(&mut sb) collects them, and ActionRecorder::to_rust_test or save_recording_as_test writes the test. Nothing is saved when the test ends. BaseCase::start_recording only marks where the log of the test’s own BaseCase calls begins.
--remote-debugimplementedBrowserConfig::with_remote_debugOpens Chrome’s debugger on port 9222; with_remote_debug_port names another.
--remote-debuggerimplementedBrowserConfig::with_remote_debugOpens Chrome’s debugger on port 9222; with_remote_debug_port names another.
--remote_debugimplementedBrowserConfig::with_remote_debugOpens Chrome’s debugger on port 9222; with_remote_debug_port names another.
--remote_debuggerimplementedBrowserConfig::with_remote_debugOpens Chrome’s debugger on port 9222; with_remote_debug_port names another.
--reuse-class-sessionimplementedBrowserConfig::with_reuse_module_sessionThe same option as —rcs: the tests of one Rust module share a browser (BrowserConfig::with_reuse_class_session(name) for the tests that pass one name). Also sbrs --reuse-class-session and SB_REUSE_CLASS_SESSION. See —rcs. Differs: See —rcs: the module plays the part of the class, and a class’s browser closes after the idle timeout, not when the next class starts.
--reuse-sessionimplementedBrowserConfig::with_reuse_sessionAlso sbrs --reuse-session (aliases --reuse_session, --rs), Settings::reuse_session and SB_REUSE_SESSION. BaseCase::new (BrowserSession::connect) leases an idle browser started with the same configuration (all of it but the start page) from a process-wide registry that keeps each browser’s WebDriver server address, session id, capabilities and the chromedriver this crate started; it attaches with a new client made in the test’s own Tokio runtime, then cleans the browser: an open dialog dismissed, every window but the first closed, every cookie deleted (Network.clearBrowserCookies on Chromium, WebDriver’s delete-all elsewhere), the open page’s local and session storage cleared, about:blank, and the start page if there is one. BaseCase::quit, run_browser_test and dropping the case give it back open. One test holds a browser at a time; one that starts while every matching browser is held gets its own, kept for reuse too. A browser that no longer answers is closed and replaced; get_new_driver browsers are never shared. Idle browsers are closed with their chromedriver after reuse::idle_timeout (5 s; reuse::set_idle_timeout, SB_REUSE_IDLE_SECS), by seleniumbase_rs::shutdown_reused_sessions() and by common::shutdown::drain_cleanups (which sbrs calls). Mock WebDriver tests in browser::reuse check that the second case sends no new-session request (from another Tokio runtime) and which cleaning commands it sends; tests/reuse_session_chrome.rs (ignored) checks in Chrome 155 that two #[tokio::test] in one binary share one Chrome (the same session id), that the first test’s cookie and local storage are gone in the second, and that the reaper closes the browser and stops chromedriver after the idle timeout. Differs: Python keeps the previous test’s cookies and page unless —crumbs is given; here a reused browser is always cleaned, because Rust tests run in any order and side by side. Python quits the shared browser when pytest ends; a Rust test binary has no end-of-run hook, so the idle timeout does it, and a binary that exits sooner after its last test leaves that browser and its chromedriver running unless shutdown_reused_sessions() is called. Under cargo-nextest each test is a process of its own and nothing is shared.
--reuse_class_sessionimplementedBrowserConfig::with_reuse_module_sessionThe same option as —rcs: the tests of one Rust module share a browser (BrowserConfig::with_reuse_class_session(name) for the tests that pass one name). Also sbrs --reuse_class_session and SB_REUSE_CLASS_SESSION. See —rcs. Differs: See —rcs: the module plays the part of the class, and a class’s browser closes after the idle timeout, not when the next class starts.
--reuse_sessionimplementedBrowserConfig::with_reuse_sessionThe same option as —reuse-session: the tests of a run share browsers, cleaned between tests. Also sbrs --reuse_session and SB_REUSE_SESSION. See —reuse-session. Differs: See —reuse-session: the browser is always cleaned (Python needs —crumbs), and it closes after an idle timeout, since a test binary has no end-of-run hook.
--rsimplementedBrowserConfig::with_reuse_sessionAlias of —reuse-session upstream: the tests of a run share browsers, cleaned between tests. Also sbrs --rs and SB_REUSE_SESSION. See —reuse-session. Differs: See —reuse-session: the browser is always cleaned (Python needs —crumbs), and it closes after an idle timeout, since a test binary has no end-of-run hook.
--safariimplementedBrowserConfig::browserRun with safaridriver, which comes with macOS; Safari needs Allow Remote Automation turned on.
--save-screenshotcomposedBaseCase::save_teardown_screenshotCall it at the end of a test.
--save_screenshotcomposedBaseCase::save_teardown_screenshotCall it at the end of a test.
--screenshotcomposedBaseCase::save_teardown_screenshotCall it at the end of a test.
--servercomposedBrowserConfig::webdriver_urlGive the full WebDriver URL instead of its parts.
--settingscomposedSettings::from_filesbrs --config FILE or Settings::load_from(path) read a TOML or JSON file; SB_* variables still apply on top. The keys are the Settings fields (browser, headless, timeout_seconds, …), not the constants of Python’s settings.py (MINI_TIMEOUT, SMALL_TIMEOUT, LARGE_TIMEOUT, …).
--settings-filecomposedSettings::from_filesbrs --config FILE or Settings::load_from(path) read a TOML or JSON file; SB_* variables still apply on top. The keys are the Settings fields (browser, headless, timeout_seconds, …), not the constants of Python’s settings.py (MINI_TIMEOUT, SMALL_TIMEOUT, LARGE_TIMEOUT, …).
--settings_filecomposedSettings::from_filesbrs --config FILE or Settings::load_from(path) read a TOML or JSON file; SB_* variables still apply on top. The keys are the Settings fields (browser, headless, timeout_seconds, …), not the constants of Python’s settings.py (MINI_TIMEOUT, SMALL_TIMEOUT, LARGE_TIMEOUT, …).
--sjwimplementedRunSettings::with_skip_js_waitsMakes wait_for_ready_state_complete return at once.
--skip-js-waitsimplementedRunSettings::with_skip_js_waitsMakes wait_for_ready_state_complete return at once.
--skip_js_waitsimplementedRunSettings::with_skip_js_waitsMakes wait_for_ready_state_complete return at once.
--slowimplementedRunSettings::with_slow_modePauses, in full, after the same actions as —demo, which also outline the element.
--slow-modeimplementedRunSettings::with_slow_modePauses, in full, after the same actions as —demo, which also outline the element.
--slow_modeimplementedRunSettings::with_slow_modePauses, in full, after the same actions as —demo, which also outline the element.
--slowmoimplementedRunSettings::with_slow_modePauses, in full, after the same actions as —demo, which also outline the element.
--sscomposedBaseCase::save_teardown_screenshotCall it at the end of a test.
--start-pageimplementedBrowserConfig::start_pageBaseCase::new opens the start page when one is set; BaseCase::open_start_page opens it again (about:blank when none is set).
--start_pageimplementedBrowserConfig::start_pageBaseCase::new opens the start page when one is set; BaseCase::open_start_page opens it again (about:blank when none is set).
--swiftshadercomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
--time-limitcomposedBaseCase::set_time_limitOnce the test has run longer than the limit (counted from creating the BaseCase), its next open, readiness wait or element action fails with a time-limit error; waits are cut to the time left. A test that does none of those is not interrupted: wrap it in tokio::time::timeout for a hard stop.
--time_limitcomposedBaseCase::set_time_limitOnce the test has run longer than the limit (counted from creating the BaseCase), its next open, readiness wait or element action fails with a time-limit error; waits are cut to the time left. A test that does none of those is not interrupted: wrap it in tokio::time::timeout for a hard stop.
--timelimitcomposedBaseCase::set_time_limitOnce the test has run longer than the limit (counted from creating the BaseCase), its next open, readiness wait or element action fails with a time-limit error; waits are cut to the time left. A test that does none of those is not interrupted: wrap it in tokio::time::timeout for a hard stop.
--timeout-multipliercomposedBaseCase::set_timeoutCall set_timeout(10 * multiplier): the default wait is 10 seconds. A timeout passed to a method explicitly is not multiplied, which matches Python, where only the default timeouts are.
--timeout_multipliercomposedBaseCase::set_timeoutCall set_timeout(10 * multiplier): the default wait is 10 seconds. A timeout passed to a method explicitly is not multiplied, which matches Python, where only the default timeouts are.
--uccomposedBrowserConfig::modeDriverMode::Uc.
--uc-cdpimplementedBrowserConfig::with_cdp_eventsCdpEventCapture::UndetectedOnly: the performance log is kept in UC mode only; read it with BrowserSession::cdp_events. Differs: Python adds a listener with driver.add_cdp_listener; here the events are read back from the log.
--uc-cdp-eventsimplementedBrowserConfig::with_cdp_eventsCdpEventCapture::UndetectedOnly: the performance log is kept in UC mode only; read it with BrowserSession::cdp_events. Differs: Python adds a listener with driver.add_cdp_listener; here the events are read back from the log.
--uc-subnot-applicableDeprecated upstream: UC Mode always launches the browser as a separate process now, and DriverMode::Uc has no other launch path to switch to.
--uc-subprocessnot-applicableDeprecated upstream: UC Mode always launches the browser as a separate process now, and DriverMode::Uc has no other launch path to switch to.
--uc_cdp_eventsimplementedBrowserConfig::with_cdp_eventsCdpEventCapture::UndetectedOnly: the performance log is kept in UC mode only; read it with BrowserSession::cdp_events. Differs: Python adds a listener with driver.add_cdp_listener; here the events are read back from the log.
--uc_subprocessnot-applicableDeprecated upstream: UC Mode always launches the browser as a separate process now, and DriverMode::Uc has no other launch path to switch to.
--undetectablecomposedBrowserConfig::modeDriverMode::Uc.
--undetectedcomposedBrowserConfig::modeDriverMode::Uc.
--urlcomposedBrowserConfig::start_pageAlias of —start-page upstream. BaseCase::new opens the start page when one is set.
--use-auto-extimplementedBrowserConfig::with_automation_extensionSets useAutomationExtension to true. Upstream marks the option deprecated. Chromium only.
--use-chromiumcomposedBrowserConfig::browserChoose the Browser variant.
--use_auto_extimplementedBrowserConfig::with_automation_extensionSets useAutomationExtension to true. Upstream marks the option deprecated. Chromium only.
--user-agentimplementedBrowserConfig::user_agent
--user-data-dirimplementedBrowserConfig::user_data_dir
--user_agentimplementedBrowserConfig::user_agent
--user_data_dirimplementedBrowserConfig::user_data_dir
--var1not-applicablepytest and unittest plumbing; the Rust test runner (api::runner) and RuntimeConfig replace it.
--var2not-applicablepytest and unittest plumbing; the Rust test runner (api::runner) and RuntimeConfig replace it.
--var3not-applicablepytest and unittest plumbing; the Rust test runner (api::runner) and RuntimeConfig replace it.
--variablesnot-applicablepytest and unittest plumbing; the Rust test runner (api::runner) and RuntimeConfig replace it.
--verify-delaynot-applicableMasterQaSession::verify prompts on the terminal, not in a browser pop-up, so there is no pop-up delay to override.
--verify_delaynot-applicableMasterQaSession::verify prompts on the terminal, not in a browser pop-up, so there is no pop-up delay to override.
--visual-baselineimplementedRunSettings::with_visual_baseline_resetcheck_window saves the page’s structure as the new baseline instead of comparing.
--visual_baselineimplementedRunSettings::with_visual_baseline_resetcheck_window saves the page’s structure as the new baseline instead of comparing.
--wait-for-angularjscomposedBaseCase::wait_for_angularjsBoth default to no waiting; call it where a page needs it.
--wait_for_angularjscomposedBaseCase::wait_for_angularjsBoth default to no waiting; call it where a page needs it.
--wfacomposedBaseCase::wait_for_angularjsBoth default to no waiting; call it where a page needs it.
--window-positionimplementedBrowserConfig::with_window_positionChrome’s --window-position; a Firefox window is moved once it runs.
--window-sizeimplementedBrowserConfig::with_window_sizeChrome’s --window-size; a Firefox window is resized once it runs.
--window_positionimplementedBrowserConfig::with_window_positionChrome’s --window-position; a Firefox window is moved once it runs.
--window_sizeimplementedBrowserConfig::with_window_sizeChrome’s --window-size; a Firefox window is resized once it runs.
--with-basic-test-infocomposedReportPlugin::jsonAlways on upstream. A failed test’s report says the kind of error, a hint, and the page’s URL and title: add ReportPlugin::json(path) to Plugins and run the test with Plugins::run_browser_test. It is one report file for the run, not a basic_test_info.txt per failure.
--with-basic_test_infocomposedReportPlugin::jsonAlways on upstream. A failed test’s report says the kind of error, a hint, and the page’s URL and title: add ReportPlugin::json(path) to Plugins and run the test with Plugins::run_browser_test. It is one report file for the run, not a basic_test_info.txt per failure.
--with-db-reportingcomposedResultStore::record_outcomeNeeds the turso feature; the store is a local database, not MySQL.
--with-db_reportingcomposedResultStore::record_outcomeNeeds the turso feature; the store is a local database, not MySQL.
--with-page-sourcecomposedPageSourceOnFailurePlugin::newAlways on upstream. Add PageSourceOnFailurePlugin::new("latest_logs") to Plugins and run the test with Plugins::run_browser_test; a failed test then saves the page source.
--with-page_sourcecomposedPageSourceOnFailurePlugin::newAlways on upstream. Add PageSourceOnFailurePlugin::new("latest_logs") to Plugins and run the test with Plugins::run_browser_test; a failed test then saves the page source.
--with-s3-loggingcomposedS3LoggingPlugin::upload_file
--with-s3_loggingcomposedS3LoggingPlugin::upload_file
--with-screen-shotscomposedScreenshotOnFailurePlugin::newAlways on upstream. Add ScreenshotOnFailurePlugin::new("latest_logs") to Plugins and run the test with Plugins::run_browser_test; a failed test then saves a PNG screenshot.
--with-screen_shotscomposedScreenshotOnFailurePlugin::newAlways on upstream. Add ScreenshotOnFailurePlugin::new("latest_logs") to Plugins and run the test with Plugins::run_browser_test; a failed test then saves a PNG screenshot.
--with-seleniumnot-applicablepytest and unittest plumbing; the Rust test runner (api::runner) and RuntimeConfig replace it.
--with-testing-basecomposedPlugins::run_browser_testDeprecated and always on upstream: logs and screenshots are saved when a test fails. Build a Plugins with ScreenshotOnFailurePlugin and PageSourceOnFailurePlugin and run the test with Plugins::run_browser_test; the runner in api::runner does none of this by itself.
--with-testing_basecomposedPlugins::run_browser_testDeprecated and always on upstream: logs and screenshots are saved when a test fails. Build a Plugins with ScreenshotOnFailurePlugin and PageSourceOnFailurePlugin and run the test with Plugins::run_browser_test; the runner in api::runner does none of this by itself.
--xvfbimplementedBrowserConfig::with_virtual_displayStarts Xvfb for a headed session on Linux that starts its own driver; ignored elsewhere, as in Python.
--xvfb-metricsimplementedVirtualDisplay::newWIDTH,HEIGHT of the virtual screen; 1366,768 when not given.
--xvfb_metricsimplementedVirtualDisplay::newWIDTH,HEIGHT of the virtual screen; 1366,768 when not given.

SB() arguments#

Keyword arguments of SB().

UpstreamStatusRustNotes
accountnot-applicableHands a free-text account string to SB() tests as sb.account; a Rust test reads its own values from std::env or a fixture file.
ad_blockcomposedBrowserConfig::ad_blockSet BrowserConfig::ad_block (BrowserConfig::with_ad_block). Refuses the requests of the ad and tracker hosts of an AdBlockList (the built-in list, or the one set with BrowserConfig::with_ad_block_list) with Network.setBlockedURLs, which a WebDriver session sends through chromedriver’s DevTools channel when it connects and for each window it switches to. Works in a Chromium WebDriver session (Chrome, Chromium, Edge, Brave, Comet, Opera, Chrome for Testing, chrome-headless-shell); Firefox, Safari and Internet Explorer have no DevTools channel through WebDriver and block nothing. The pure CDP engine blocks hosts with LaunchOptionsBuilder::ad_block. Python hides the ad elements of a loaded page, which BaseCase::ad_block does when called. A URL that names a port is not matched, and a frame of another site is not stopped from loading and its own requests are not blocked (a frame of the page’s own site is). Checked in a real Chrome 155 with chromedriver 155 on macOS (tests/ad_block_chrome.rs).
ad_block_oncomposedBrowserConfig::ad_blockSet BrowserConfig::ad_block (BrowserConfig::with_ad_block). Refuses the requests of the ad and tracker hosts of an AdBlockList (the built-in list, or the one set with BrowserConfig::with_ad_block_list) with Network.setBlockedURLs, which a WebDriver session sends through chromedriver’s DevTools channel when it connects and for each window it switches to. Works in a Chromium WebDriver session (Chrome, Chromium, Edge, Brave, Comet, Opera, Chrome for Testing, chrome-headless-shell); Firefox, Safari and Internet Explorer have no DevTools channel through WebDriver and block nothing. The pure CDP engine blocks hosts with LaunchOptionsBuilder::ad_block. Python hides the ad elements of a loaded page, which BaseCase::ad_block does when called. A URL that names a port is not matched, and a frame of another site is not stopped from loading and its own requests are not blocked (a frame of the page’s own site is). Checked in a real Chrome 155 with chromedriver 155 on macOS (tests/ad_block_chrome.rs).
agentcomposedBrowserConfig::user_agent
binary_locationcomposedBrowserConfig::browser_binary_path
block_imagesimplementedBrowserConfig::with_block_imagesChrome’s content-setting preference (prefs of goog:chromeOptions), or Firefox’s permissions.default.image.
browserimplementedBrowserConfig::browser
cap_fileimplementedCapabilityOverrides::from_fileReads JSON or the Python dictionary of a capabilities file without running Python; merged over the session’s capabilities with BrowserConfig::with_capabilities. Differs: Python’s parser reads one key per line; this reads the whole dictionary.
cap_stringimplementedCapabilityOverrides::from_textJSON, or a Python dictionary; merged over the session’s capabilities with BrowserConfig::with_capabilities.
cftimplementedBrowserConfig::browserChrome for Testing, downloaded into downloaded_drivers/cft/ when missing; the driver follows its version.
chromium_argcomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
chsimplementedBrowserConfig::browserchrome-headless-shell, downloaded into downloaded_drivers/chs/ when missing; it cannot run UC mode.
dark_modecomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
datanot-applicablePasses one free-text string into SB() tests as sb.data; a Rust test reads its own values from std::env or a fixture file.
demoimplementedRunSettings::with_demo_modeOutlines the element and pauses after the actions Python’s demo mode covers (open, the clicks, typing, the selects, submit, focus, drag and drop, the window size calls and more); a pause is full after an action that changed the URL and 1/3.4 of it after one that did not; hand the settings to BaseCase::set_run_settings.
demo_sleepimplementedRunSettings::with_demo_sleepThe pause demo and slow mode make after an action.
device_metricsimplementedBrowserConfig::with_device_metricsChrome’s mobileEmulation experimental option. Differs: Python applies the metrics only together with —mobile; here setting them turns mobile emulation on.
devtoolscomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
disable_beforeunloadcomposedBaseCase::disable_beforeunloadCall it after each navigation.
disable_cookiesimplementedBrowserConfig::with_disable_cookiesChrome’s cookie content-setting preference, or Firefox’s network.cookie.cookieBehavior.
disable_cspimplementedBrowserConfig::with_disable_cspLoads the bundled Disable CSP extension, which removes the Content-Security-Policy headers. Chromium only.
disable_featurescomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
disable_jsimplementedBrowserConfig::with_disable_jsChrome’s JavaScript content-setting preference, or Firefox’s javascript.enabled.
disable_wscomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
do_not_trackimplementedBrowserConfig::with_do_not_trackChrome’s enable_do_not_track preference, or Firefox’s privacy.donottrackheader.enabled.
driver_versionimplementedBrowserConfig::with_driver_versionbrowser, latest, stable, beta, dev, canary, a major version or a full version. The driver goes to downloaded_drivers/chromedriver-<version>/.
enable_3d_apiscomposedBrowserConfig::headlessPython adds —disable-3d-apis and —disable-gpu unless enable_3d_apis is set. A Rust session never adds —disable-3d-apis, and adds —disable-gpu only when it is headless, so a headed session already has 3D APIs on. Differs: A headless session always adds —disable-gpu, and there is no option to leave it out.
enable_syncimplementedBrowserConfig::with_enable_syncChrome Sync is switched off with --disable-sync unless this is set.
enable_wsnot-applicablePython adds —disable-web-security unless enable_ws is set. A Rust session never adds it, so web security is already on and there is nothing to enable.
environmentnot-applicableNames the test environment (qa, prod, …) for SB() tests; this crate takes per-deploy configuration from SB_* environment variables (RuntimeConfig) instead.
extension_dirimplementedBrowserConfig::extension_dir
extension_zipimplementedBrowserConfig::with_extension_archiveA .zip or .crx file, sent in the extensions option of goog:chromeOptions. Chromium only.
external_pdfimplementedBrowserConfig::with_external_pdfChrome’s plugins.always_open_pdf_externally, or Firefox’s pdfjs.disabled.
fastnot-applicablePython 4.55.2 reads fast only in CDP mode, where it skips the 0.2 s wait after a click and the wait after opening a page; demo mode never checks it. This crate’s CDP engine makes neither wait, so there is nothing to skip. RunSettings::with_fast_mode is kept, deprecated, and does nothing.
firefox_argimplementedFirefoxOptions::add_argsComma-separated; FirefoxOptions goes to BrowserConfig::with_firefox_options.
firefox_prefimplementedFirefoxOptions::add_preferencesComma-separated NAME:VALUE; FirefoxOptions goes to BrowserConfig::with_firefox_options.
guestcomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
guest_modecomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
headedcomposedBrowserConfig::headlessHeaded is headless = false.
headlessimplementedBrowserConfig::headless
headless1composedBrowserConfig::browserChrome’s old headless mode now exists only as chrome-headless-shell: choose Browser::ChromeHeadlessShell as the browser, with headless set. BrowserConfig::headless alone launches the new mode.
headless2composedBrowserConfig::headlessheadless = true launches Chrome’s new headless mode (--headless=new), which is what headless2 asks for.
highlightsnot-applicableBaseCase::highlight outlines the element once and restores it after about a second; it has no loop count for a highlights argument to override.
host_resolver_rulescomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
incognitocomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
intervalnot-applicableTour and Presentation here advance only when told, with no autoplay, so there is no interval to override.
is_mobilecomposedBrowserConfig::mobileGive the screen with with_device_metrics.
js_checking_oncomposedBaseCase::assert_no_js_errorsCall it after the page loads.
localeimplementedBrowserConfig::locale
locale_codecomposedBrowserConfig::locale
log_cdpimplementedBrowserConfig::with_cdp_eventsAsks the driver to keep the performance log; read it with BrowserSession::cdp_events.
log_cdp_eventsimplementedBrowserConfig::with_cdp_eventsAsks the driver to keep the performance log; read it with BrowserSession::cdp_events.
maximizecomposedBaseCase::maximize_windowCall maximize_window() once the session has started; it works for Firefox too. A session always starts with a —window-size, so —start-maximized alone is not relied on.
message_durationimplementedRunSettings::with_message_durationHow long BaseCase::post_message keeps its message, to the millisecond (2.55 s by default, 0.75 s at most in a headless browser).
mobileimplementedBrowserConfig::mobile
multi_proxycomposedLaunchOptionsBuilder::proxyEach pure CDP browser answers its own proxy login over the protocol, so browsers running in parallel can use different authenticated proxies with no switch. The WebDriver engine passes the proxy as a flag and cannot log in to one.
no_screenshotnot-applicableNothing to turn off: this crate saves a screenshot only when a test or ScreenshotOnFailurePlugin asks for one.
page_load_strategyimplementedBrowserConfig::with_page_load_strategyThe pageLoadStrategy capability: normal, eager or none.
plsimplementedBrowserConfig::with_page_load_strategyThe pageLoadStrategy capability: normal, eager or none.
portcomposedBrowserConfig::webdriver_urlGive the full WebDriver URL instead of its parts.
positionimplementedBrowserConfig::with_window_positionChrome’s --window-position; a Firefox window is moved once it runs.
protocolcomposedBrowserConfig::webdriver_urlGive the full WebDriver URL instead of its parts.
proxyimplementedBrowserConfig::proxyDiffers: SERVER:PORT only: a WebDriver session cannot log in to a proxy, so USER:PASS@SERVER:PORT does not authenticate. The pure CDP engine can (LaunchOptionsBuilder::proxy).
proxy_bypass_listimplementedBrowserConfig::with_proxy_bypass_listChrome’s --proxy-bypass-list. It applies to a proxy named with proxy, not to a PAC file.
proxy_pac_urlimplementedBrowserConfig::proxy_pac_urlDiffers: URL only: a WebDriver session cannot log in to a proxy, so USERNAME:PASSWORD@URL does not authenticate.
raise_test_failurenot-applicableMakes the SB() context manager re-raise a failing test; every Rust BaseCase method returns Result, so a failure already reaches the caller as an Err.
rec_behaveimplementedActionRecorder::to_gherkinWrites a feature for the common browser steps; save_recording_as_feature saves it.
rec_printcomposedBaseCase::export_recording_as_rustPrint the returned text.
rec_sb_cdpimplementedBrowserConfig::with_rec_sb_cdpAlso Settings::rec_sb_cdp, SB_REC_SB_CDP and sbrs --rec-sb-cdp. With it on, BaseCase::export_recording_as_rust and save_recording_to_logs write ActionRecorder::to_cdp_script, a pure CDP program; see --rec-sb-cdp. Differs: Python writes the file when the SB() block ends; here you ask for it (export_recording_as_rust, save_recording_to_logs).
rec_sb_mgrcomposedActionRecorder::to_rust_scriptPython’s with SB() as sb: form is a standalone script. ActionRecorder::to_rust_script writes the recording as a standalone #[tokio::main] Rust program (BaseCase::export_recording_as_rust returns it); to_rust_test writes a test instead.
record_sleepimplementedRunSettings::with_record_sleepBaseCase::sleep goes into the recording, and the generated Rust calls sb.sleep.
recorder_extimplementedBrowserConfig::with_recorder_extensionLoads the bundled SeleniumBase Recorder extension. Chromium only.
remote_debugimplementedBrowserConfig::with_remote_debugOpens Chrome’s debugger on port 9222; with_remote_debug_port names another.
rtfnot-applicableMakes the SB() context manager re-raise a failing test; every Rust BaseCase method returns Result, so a failure already reaches the caller as an Err.
save_screenshotcomposedBaseCase::save_teardown_screenshotCall it at the end of a test.
servercomposedBrowserConfig::webdriver_urlGive the full WebDriver URL instead of its parts.
servernamecomposedBrowserConfig::webdriver_urlGive the full WebDriver URL, with the Grid’s host in it.
settings_filecomposedSettings::from_filesbrs --config FILE or Settings::load_from(path) read a TOML or JSON file; SB_* variables still apply on top. The keys are the Settings fields (browser, headless, timeout_seconds, …), not the constants of Python’s settings.py (MINI_TIMEOUT, SMALL_TIMEOUT, LARGE_TIMEOUT, …).
sizeimplementedBrowserConfig::with_window_sizeChrome’s --window-size; a Firefox window is resized once it runs.
sjwimplementedRunSettings::with_skip_js_waitsMakes wait_for_ready_state_complete return at once.
skip_js_waitsimplementedRunSettings::with_skip_js_waitsMakes wait_for_ready_state_complete return at once.
slowimplementedRunSettings::with_slow_modePauses, in full, after the same actions as —demo, which also outline the element.
start_pageimplementedBrowserConfig::start_pageBaseCase::new opens the start page when one is set; BaseCase::open_start_page opens it again (about:blank when none is set).
swiftshadercomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
testnot-applicableMarks an SB() context-manager block as a test so it prints pytest-style results; Rust code runs under cargo test, which reports results itself.
time_limitcomposedBaseCase::set_time_limitOnce the test has run longer than the limit (counted from creating the BaseCase), its next open, readiness wait or element action fails with a time-limit error; waits are cut to the time left. A test that does none of those is not interrupted: wrap it in tokio::time::timeout for a hard stop.
timeout_multipliercomposedBaseCase::set_timeoutCall set_timeout(10 * multiplier): the default wait is 10 seconds. A timeout passed to a method explicitly is not multiplied, which matches Python, where only the default timeouts are.
uccomposedBrowserConfig::modeDriverMode::Uc.
uc_cdpimplementedBrowserConfig::with_cdp_eventsCdpEventCapture::UndetectedOnly: the performance log is kept in UC mode only; read it with BrowserSession::cdp_events. Differs: Python adds a listener with driver.add_cdp_listener; here the events are read back from the log.
uc_cdp_eventsimplementedBrowserConfig::with_cdp_eventsCdpEventCapture::UndetectedOnly: the performance log is kept in UC mode only; read it with BrowserSession::cdp_events. Differs: Python adds a listener with driver.add_cdp_listener; here the events are read back from the log.
uc_subnot-applicableDeprecated upstream: UC Mode always launches the browser as a separate process now, and DriverMode::Uc has no other launch path to switch to.
uc_subprocessnot-applicableDeprecated upstream: UC Mode always launches the browser as a separate process now, and DriverMode::Uc has no other launch path to switch to.
undetectablecomposedBrowserConfig::modeDriverMode::Uc.
undetectedcomposedBrowserConfig::modeDriverMode::Uc.
use_auto_extimplementedBrowserConfig::with_automation_extensionSets useAutomationExtension to true. Upstream marks the option deprecated. Chromium only.
use_chromiumcomposedBrowserConfig::browserChoose the Browser variant.
user_data_dirimplementedBrowserConfig::user_data_dir
var1not-applicablepytest and unittest plumbing; the Rust test runner (api::runner) and RuntimeConfig replace it.
var2not-applicablepytest and unittest plumbing; the Rust test runner (api::runner) and RuntimeConfig replace it.
var3not-applicablepytest and unittest plumbing; the Rust test runner (api::runner) and RuntimeConfig replace it.
variablesnot-applicablepytest and unittest plumbing; the Rust test runner (api::runner) and RuntimeConfig replace it.
wait_for_angularjscomposedBaseCase::wait_for_angularjsBoth default to no waiting; call it where a page needs it.
wfacomposedBaseCase::wait_for_angularjsBoth default to no waiting; call it where a page needs it.
window_positionimplementedBrowserConfig::with_window_positionChrome’s --window-position; a Firefox window is moved once it runs.
window_sizeimplementedBrowserConfig::with_window_sizeChrome’s --window-size; a Firefox window is resized once it runs.
xvfbimplementedBrowserConfig::with_virtual_displayStarts Xvfb for a headed session on Linux that starts its own driver; ignored elsewhere, as in Python.
xvfb_metricsimplementedVirtualDisplay::newWIDTH,HEIGHT of the virtual screen; 1366,768 when not given.

Driver() arguments#

Keyword arguments of Driver().

UpstreamStatusRustNotes
ad_blockcomposedBrowserConfig::ad_blockSet BrowserConfig::ad_block (BrowserConfig::with_ad_block). Refuses the requests of the ad and tracker hosts of an AdBlockList (the built-in list, or the one set with BrowserConfig::with_ad_block_list) with Network.setBlockedURLs, which a WebDriver session sends through chromedriver’s DevTools channel when it connects and for each window it switches to. Works in a Chromium WebDriver session (Chrome, Chromium, Edge, Brave, Comet, Opera, Chrome for Testing, chrome-headless-shell); Firefox, Safari and Internet Explorer have no DevTools channel through WebDriver and block nothing. The pure CDP engine blocks hosts with LaunchOptionsBuilder::ad_block. Python hides the ad elements of a loaded page, which BaseCase::ad_block does when called. A URL that names a port is not matched, and a frame of another site is not stopped from loading and its own requests are not blocked (a frame of the page’s own site is). Checked in a real Chrome 155 with chromedriver 155 on macOS (tests/ad_block_chrome.rs).
ad_block_oncomposedBrowserConfig::ad_blockSet BrowserConfig::ad_block (BrowserConfig::with_ad_block). Refuses the requests of the ad and tracker hosts of an AdBlockList (the built-in list, or the one set with BrowserConfig::with_ad_block_list) with Network.setBlockedURLs, which a WebDriver session sends through chromedriver’s DevTools channel when it connects and for each window it switches to. Works in a Chromium WebDriver session (Chrome, Chromium, Edge, Brave, Comet, Opera, Chrome for Testing, chrome-headless-shell); Firefox, Safari and Internet Explorer have no DevTools channel through WebDriver and block nothing. The pure CDP engine blocks hosts with LaunchOptionsBuilder::ad_block. Python hides the ad elements of a loaded page, which BaseCase::ad_block does when called. A URL that names a port is not matched, and a frame of another site is not stopped from loading and its own requests are not blocked (a frame of the page’s own site is). Checked in a real Chrome 155 with chromedriver 155 on macOS (tests/ad_block_chrome.rs).
agentcomposedBrowserConfig::user_agent
binary_locationcomposedBrowserConfig::browser_binary_path
block_imagesimplementedBrowserConfig::with_block_imagesChrome’s content-setting preference (prefs of goog:chromeOptions), or Firefox’s permissions.default.image.
browserimplementedBrowserConfig::browser
cap_fileimplementedCapabilityOverrides::from_fileReads JSON or the Python dictionary of a capabilities file without running Python; merged over the session’s capabilities with BrowserConfig::with_capabilities. Differs: Python’s parser reads one key per line; this reads the whole dictionary.
cap_stringimplementedCapabilityOverrides::from_textJSON, or a Python dictionary; merged over the session’s capabilities with BrowserConfig::with_capabilities.
cftimplementedBrowserConfig::browserChrome for Testing, downloaded into downloaded_drivers/cft/ when missing; the driver follows its version.
chromium_argcomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
chsimplementedBrowserConfig::browserchrome-headless-shell, downloaded into downloaded_drivers/chs/ when missing; it cannot run UC mode.
d_heightimplementedDeviceMetrics::height
d_p_rimplementedDeviceMetrics::pixel_ratio
d_widthimplementedDeviceMetrics::width
dark_modecomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
devtoolscomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
disable_cookiesimplementedBrowserConfig::with_disable_cookiesChrome’s cookie content-setting preference, or Firefox’s network.cookie.cookieBehavior.
disable_cspimplementedBrowserConfig::with_disable_cspLoads the bundled Disable CSP extension, which removes the Content-Security-Policy headers. Chromium only.
disable_featurescomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
disable_gpucomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
disable_jsimplementedBrowserConfig::with_disable_jsChrome’s JavaScript content-setting preference, or Firefox’s javascript.enabled.
disable_wscomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
do_not_trackimplementedBrowserConfig::with_do_not_trackChrome’s enable_do_not_track preference, or Firefox’s privacy.donottrackheader.enabled.
driver_versionimplementedBrowserConfig::with_driver_versionbrowser, latest, stable, beta, dev, canary, a major version or a full version. The driver goes to downloaded_drivers/chromedriver-<version>/.
enable_3d_apiscomposedBrowserConfig::headlessPython adds —disable-3d-apis and —disable-gpu unless enable_3d_apis is set. A Rust session never adds —disable-3d-apis, and adds —disable-gpu only when it is headless, so a headed session already has 3D APIs on. Differs: A headless session always adds —disable-gpu, and there is no option to leave it out.
enable_syncimplementedBrowserConfig::with_enable_syncChrome Sync is switched off with --disable-sync unless this is set.
enable_wsnot-applicablePython adds —disable-web-security unless enable_ws is set. A Rust session never adds it, so web security is already on and there is nothing to enable.
extension_dirimplementedBrowserConfig::extension_dir
extension_zipimplementedBrowserConfig::with_extension_archiveA .zip or .crx file, sent in the extensions option of goog:chromeOptions. Chromium only.
external_pdfimplementedBrowserConfig::with_external_pdfChrome’s plugins.always_open_pdf_externally, or Firefox’s pdfjs.disabled.
firefox_argimplementedFirefoxOptions::add_argsComma-separated; FirefoxOptions goes to BrowserConfig::with_firefox_options.
firefox_prefimplementedFirefoxOptions::add_preferencesComma-separated NAME:VALUE; FirefoxOptions goes to BrowserConfig::with_firefox_options.
guestcomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
guest_modecomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
headedcomposedBrowserConfig::headlessHeaded is headless = false.
headlessimplementedBrowserConfig::headless
headless1composedBrowserConfig::browserChrome’s old headless mode now exists only as chrome-headless-shell: choose Browser::ChromeHeadlessShell as the browser, with headless set. BrowserConfig::headless alone launches the new mode.
headless2composedBrowserConfig::headlessheadless = true launches Chrome’s new headless mode (--headless=new), which is what headless2 asks for.
host_resolver_rulescomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
incognitocomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
is_mobilecomposedBrowserConfig::mobileGive the screen with with_device_metrics.
localeimplementedBrowserConfig::locale
locale_codecomposedBrowserConfig::locale
log_cdpimplementedBrowserConfig::with_cdp_eventsAsks the driver to keep the performance log; read it with BrowserSession::cdp_events.
log_cdp_eventsimplementedBrowserConfig::with_cdp_eventsAsks the driver to keep the performance log; read it with BrowserSession::cdp_events.
mobileimplementedBrowserConfig::mobile
multi_proxycomposedLaunchOptionsBuilder::proxyEach pure CDP browser answers its own proxy login over the protocol, so browsers running in parallel can use different authenticated proxies with no switch. The WebDriver engine passes the proxy as a flag and cannot log in to one.
no_sandboxcomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
page_load_strategyimplementedBrowserConfig::with_page_load_strategyThe pageLoadStrategy capability: normal, eager or none.
plsimplementedBrowserConfig::with_page_load_strategyThe pageLoadStrategy capability: normal, eager or none.
portcomposedBrowserConfig::webdriver_urlGive the full WebDriver URL instead of its parts.
positionimplementedBrowserConfig::with_window_positionChrome’s --window-position; a Firefox window is moved once it runs.
protocolcomposedBrowserConfig::webdriver_urlGive the full WebDriver URL instead of its parts.
proxyimplementedBrowserConfig::proxyDiffers: SERVER:PORT only: a WebDriver session cannot log in to a proxy, so USER:PASS@SERVER:PORT does not authenticate. The pure CDP engine can (LaunchOptionsBuilder::proxy).
proxy_bypass_listimplementedBrowserConfig::with_proxy_bypass_listChrome’s --proxy-bypass-list. It applies to a proxy named with proxy, not to a PAC file.
proxy_pac_urlimplementedBrowserConfig::proxy_pac_urlDiffers: URL only: a WebDriver session cannot log in to a proxy, so USERNAME:PASSWORD@URL does not authenticate.
recorder_extimplementedBrowserConfig::with_recorder_extensionLoads the bundled SeleniumBase Recorder extension. Chromium only.
remote_debugimplementedBrowserConfig::with_remote_debugOpens Chrome’s debugger on port 9222; with_remote_debug_port names another.
servercomposedBrowserConfig::webdriver_urlGive the full WebDriver URL instead of its parts.
servernamecomposedBrowserConfig::webdriver_urlGive the full WebDriver URL, with the Grid’s host in it.
sizeimplementedBrowserConfig::with_window_sizeChrome’s --window-size; a Firefox window is resized once it runs.
swiftshadercomposedBrowserConfig::extra_argsPassed to the browser as a command-line flag through BrowserConfig::extra_args.
uccomposedBrowserConfig::modeDriverMode::Uc.
uc_cdpimplementedBrowserConfig::with_cdp_eventsCdpEventCapture::UndetectedOnly: the performance log is kept in UC mode only; read it with BrowserSession::cdp_events. Differs: Python adds a listener with driver.add_cdp_listener; here the events are read back from the log.
uc_cdp_eventsimplementedBrowserConfig::with_cdp_eventsCdpEventCapture::UndetectedOnly: the performance log is kept in UC mode only; read it with BrowserSession::cdp_events. Differs: Python adds a listener with driver.add_cdp_listener; here the events are read back from the log.
uc_subnot-applicableDeprecated upstream: UC Mode always launches the browser as a separate process now, and DriverMode::Uc has no other launch path to switch to.
uc_subprocessnot-applicableDeprecated upstream: UC Mode always launches the browser as a separate process now, and DriverMode::Uc has no other launch path to switch to.
undetectablecomposedBrowserConfig::modeDriverMode::Uc.
undetectedcomposedBrowserConfig::modeDriverMode::Uc.
use_auto_extimplementedBrowserConfig::with_automation_extensionSets useAutomationExtension to true. Upstream marks the option deprecated. Chromium only.
use_chromiumcomposedBrowserConfig::browserChoose the Browser variant.
user_data_dirimplementedBrowserConfig::user_data_dir
window_positionimplementedBrowserConfig::with_window_positionChrome’s --window-position; a Firefox window is moved once it runs.
window_sizeimplementedBrowserConfig::with_window_sizeChrome’s --window-size; a Firefox window is resized once it runs.

MCP: CDP server#

Rust: sbrs-mcp --server cdp.

UpstreamStatusRustNotes
assert_conditionimplementedmcp::cdp
check_if_conditionimplementedmcp::cdp
click_elementimplementedmcp::cdp
close_browserimplementedmcp::cdp
find_elementsimplementedmcp::cdp
focus_elementimplementedmcp::cdp
get_attributesimplementedmcp::cdp
get_contentimplementedmcp::cdp
get_page_infoimplementedmcp::cdp
hover_actionimplementedmcp::cdp
manage_cookiesimplementedmcp::cdp
manage_historyimplementedmcp::cdp
manage_storageimplementedmcp::cdp
manage_tabsimplementedmcp::cdp
manage_windowimplementedmcp::cdp
open_urlimplementedmcp::cdp
run_javascriptimplementedmcp::cdp
save_pageimplementedmcp::cdp
scroll_pageimplementedmcp::cdp
select_optionimplementedmcp::cdp
solve_captchaimplementedmcp::cdp
start_browserimplementedmcp::cdp
type_textimplementedmcp::cdp
wait_for_conditionimplementedmcp::cdp

MCP: Driver server#

Rust: sbrs-mcp --server driver.

UpstreamStatusRustNotes
activate_cdp_modeimplementedmcp::driver
assert_elementimplementedmcp::driver
assert_textimplementedmcp::driver
click_elementimplementedmcp::driver
close_browserimplementedmcp::driver
execute_scriptimplementedmcp::driver
find_elements_countimplementedmcp::driver
get_current_urlimplementedmcp::driver
get_page_sourceimplementedmcp::driver
get_textimplementedmcp::driver
get_titleimplementedmcp::driver
go_backimplementedmcp::driver
go_forwardimplementedmcp::driver
is_element_visibleimplementedmcp::driver
open_urlimplementedmcp::driver
refresh_pageimplementedmcp::driver
save_screenshotimplementedmcp::driver
select_option_by_indeximplementedmcp::driver
select_option_by_textimplementedmcp::driver
select_option_by_valueimplementedmcp::driver
solve_captchaimplementedmcp::driver
start_browserimplementedmcp::driver
switch_to_default_contentimplementedmcp::driver
switch_to_frameimplementedmcp::driver
type_textimplementedmcp::driver
wait_for_elementimplementedmcp::driver

MCP: SB server#

Rust: sbrs-mcp --server sb.

UpstreamStatusRustNotes
activate_cdp_modeimplementedmcp::sb
assert_elementimplementedmcp::sb
assert_element_not_visibleimplementedmcp::sb
assert_element_presentimplementedmcp::sb
assert_exact_textimplementedmcp::sb
assert_no_404_errorsimplementedmcp::sb
assert_no_js_errorsimplementedmcp::sb
assert_textimplementedmcp::sb
assert_titleimplementedmcp::sb
assert_urlimplementedmcp::sb
assert_url_containsimplementedmcp::sb
choose_fileimplementedmcp::sb
clear_inputimplementedmcp::sb
click_elementimplementedmcp::sb
click_if_visibleimplementedmcp::sb
click_linkimplementedmcp::sb
click_nth_visible_elementimplementedmcp::sb
click_visible_elementsimplementedmcp::sb
close_browserimplementedmcp::sb
context_clickimplementedmcp::sb
delete_all_cookiesimplementedmcp::sb
double_clickimplementedmcp::sb
download_fileimplementedmcp::sb
drag_and_dropimplementedmcp::sb
enter_mfa_codeimplementedmcp::sb
evaluateimplementedmcp::sb
execute_scriptimplementedmcp::sb
find_elements_countimplementedmcp::sb
flashimplementedmcp::sb
get_attributeimplementedmcp::sb
get_cookiesimplementedmcp::sb
get_current_urlimplementedmcp::sb
get_element_htmlimplementedmcp::sb
get_html_sourceimplementedmcp::sb
get_local_storage_itemimplementedmcp::sb
get_mfa_codeimplementedmcp::sb
get_originimplementedmcp::sb
get_page_infoimplementedmcp::sb
get_session_storage_itemimplementedmcp::sb
get_textimplementedmcp::sb
get_titleimplementedmcp::sb
get_user_agentimplementedmcp::sb
get_window_rectimplementedmcp::sb
go_backimplementedmcp::sb
go_forwardimplementedmcp::sb
highlightimplementedmcp::sb
hover_and_clickimplementedmcp::sb
is_element_clickableimplementedmcp::sb
is_element_presentimplementedmcp::sb
is_element_visibleimplementedmcp::sb
is_selectedimplementedmcp::sb
is_text_visibleimplementedmcp::sb
load_cookiesimplementedmcp::sb
maximize_windowimplementedmcp::sb
minimize_windowimplementedmcp::sb
nested_clickimplementedmcp::sb
open_new_tabimplementedmcp::sb
open_urlimplementedmcp::sb
print_to_pdfimplementedmcp::sb
refresh_pageimplementedmcp::sb
save_cookiesimplementedmcp::sb
save_page_sourceimplementedmcp::sb
save_screenshotimplementedmcp::sb
scroll_downimplementedmcp::sb
scroll_into_viewimplementedmcp::sb
scroll_to_bottomimplementedmcp::sb
scroll_to_topimplementedmcp::sb
scroll_upimplementedmcp::sb
select_option_by_indeximplementedmcp::sb
select_option_by_textimplementedmcp::sb
select_option_by_valueimplementedmcp::sb
set_local_storage_itemimplementedmcp::sb
set_session_storage_itemimplementedmcp::sb
set_valueimplementedmcp::sb
sleepimplementedmcp::sb
solve_captchaimplementedmcp::sb
start_browserimplementedmcp::sb
submitimplementedmcp::sb
switch_to_default_contentimplementedmcp::sb
switch_to_default_windowimplementedmcp::sb
switch_to_frameimplementedmcp::sb
switch_to_newest_tabimplementedmcp::sb
type_textimplementedmcp::sb
wait_for_elementimplementedmcp::sb
wait_for_element_absentimplementedmcp::sb
wait_for_element_not_visibleimplementedmcp::sb
wait_for_element_presentimplementedmcp::sb
wait_for_textimplementedmcp::sb