seleniumbase 4.53.1__tar.gz → 4.53.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {seleniumbase-4.53.1/seleniumbase.egg-info → seleniumbase-4.53.2}/PKG-INFO +4 -4
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/mcp_servers/server.py +203 -36
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/requirements.txt +2 -2
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/__version__.py +1 -1
- {seleniumbase-4.53.1 → seleniumbase-4.53.2/seleniumbase.egg-info}/PKG-INFO +4 -4
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase.egg-info/requires.txt +2 -2
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/setup.py +10 -7
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/.gitignore +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/LICENSE +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/MANIFEST.in +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/README.md +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/install.sh +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/mcp_servers/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/pyproject.toml +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/pytest.ini +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/sbase/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/sbase/__main__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/sbase/steps.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/__main__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/behave/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/behave/behave_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/behave/behave_sb.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/behave/steps.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/common/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/common/decorators.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/common/encryption.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/common/exceptions.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/common/obfuscate.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/common/unobfuscate.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/config/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/config/ad_block_list.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/config/proxy_list.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/config/settings.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/logo_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/rich_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/run.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/sb_behave_gui.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/sb_caseplans.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/sb_commander.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/sb_install.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/sb_mkchart.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/sb_mkdir.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/sb_mkfile.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/sb_mkpres.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/sb_mkrec.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/sb_objectify.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/sb_print.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/console_scripts/sb_recorder.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/application_manager.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/browser_launcher.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/capabilities_parser.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/colored_traceback.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/create_db_tables.sql +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/detect_b_ver.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/download_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/encoded_images.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/jqc_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/log_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/mysql.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/nest_asyncio.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/proxy_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/recorder_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/report_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/s3_manager.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/sb_cdp.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/sb_driver.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/session_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/settings_parser.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/style_sheet.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/testcase_manager.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/tour_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/core/visual_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/drivers/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/drivers/brave_drivers/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/drivers/cft_drivers/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/drivers/chromium_drivers/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/drivers/chs_drivers/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/drivers/comet_drivers/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/drivers/opera_drivers/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/extensions/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/extensions/ad_block.zip +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/extensions/disable_csp.zip +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/extensions/recorder.zip +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/extensions/sbase_ext.zip +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/fixtures/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/fixtures/base_case.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/fixtures/constants.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/fixtures/css_to_xpath.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/fixtures/errors.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/fixtures/js_utils.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/fixtures/page_actions.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/fixtures/page_utils.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/fixtures/shared_utils.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/fixtures/unittest_helper.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/fixtures/words.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/fixtures/xpath_to_css.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/js_code/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/js_code/active_css_js.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/js_code/live_js.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/js_code/recorder_js.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/masterqa/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/masterqa/master_qa.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/plugins/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/plugins/base_plugin.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/plugins/basic_test_info.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/plugins/db_reporting_plugin.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/plugins/driver_manager.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/plugins/page_source.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/plugins/pytest_plugin.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/plugins/s3_logging_plugin.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/plugins/sb_manager.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/plugins/screen_shots.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/plugins/selenium_plugin.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/resources/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/translate/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/translate/chinese.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/translate/dutch.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/translate/french.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/translate/italian.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/translate/japanese.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/translate/korean.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/translate/master_dict.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/translate/portuguese.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/translate/russian.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/translate/spanish.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/translate/translator.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/cdp.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/cdp_driver/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/cdp_driver/_contradict.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/cdp_driver/browser.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/cdp_driver/cdp_util.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/cdp_driver/config.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/cdp_driver/connection.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/cdp_driver/element.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/cdp_driver/tab.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/dprocess.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/options.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/patcher.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/reactor.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/undetected/webelement.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_grid/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_grid/download_selenium_server.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_grid/font_color +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_grid/grid-hub +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_grid/grid-node +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_grid/grid_hub.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_grid/grid_node.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_grid/register-grid-node.bat +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_grid/register-grid-node.sh +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_grid/start-grid-hub.bat +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_grid/start-grid-hub.sh +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_ide/__init__.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase/utilities/selenium_ide/convert_ide.py +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase.egg-info/SOURCES.txt +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase.egg-info/dependency_links.txt +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase.egg-info/entry_points.txt +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/seleniumbase.egg-info/top_level.txt +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/setup.cfg +0 -0
- {seleniumbase-4.53.1 → seleniumbase-4.53.2}/virtualenv_install.sh +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: seleniumbase
|
|
3
|
-
Version: 4.53.
|
|
3
|
+
Version: 4.53.2
|
|
4
4
|
Summary: SeleniumBase is a framework for web crawling, scraping, and testing. Supports pytest. CDP Mode adds stealth. Includes many tools.
|
|
5
5
|
Home-page: https://github.com/seleniumbase/SeleniumBase
|
|
6
6
|
Author: Michael Mintz
|
|
@@ -16,7 +16,7 @@ Project-URL: PyPI, https://pypi.org/project/seleniumbase/
|
|
|
16
16
|
Project-URL: Source, https://github.com/seleniumbase/SeleniumBase
|
|
17
17
|
Project-URL: Repository, https://github.com/seleniumbase/SeleniumBase
|
|
18
18
|
Project-URL: Documentation, https://seleniumbase.io/
|
|
19
|
-
Keywords: pytest,selenium,framework,automation,browser,testing,webdriver,seleniumbase,sbase,web-crawling,web-scraping,stealth,chromium,playwright,anti-detection,captcha-bypass,
|
|
19
|
+
Keywords: cdp,mcp,pytest,selenium,framework,automation,browser,testing,webdriver,seleniumbase,sbase,web-crawling,web-scraping,stealth,chromium,playwright,anti-detection,captcha-bypass,ai-agent,llm-tools,model-context-protocol
|
|
20
20
|
Platform: Windows
|
|
21
21
|
Platform: Linux
|
|
22
22
|
Platform: Mac OS-X
|
|
@@ -67,7 +67,7 @@ Requires-Dist: certifi>=2026.7.22
|
|
|
67
67
|
Requires-Dist: exceptiongroup>=1.3.1
|
|
68
68
|
Requires-Dist: websockets~=16.1.1; python_version == "3.10"
|
|
69
69
|
Requires-Dist: websockets>=16.1.1; python_version >= "3.11"
|
|
70
|
-
Requires-Dist: filelock>=3.32.
|
|
70
|
+
Requires-Dist: filelock>=3.32.5
|
|
71
71
|
Requires-Dist: fasteners>=0.20
|
|
72
72
|
Requires-Dist: mycdp>=1.4.0
|
|
73
73
|
Requires-Dist: pynose>=1.5.5
|
|
@@ -96,7 +96,7 @@ Requires-Dist: outcome==1.3.0.post0
|
|
|
96
96
|
Requires-Dist: trio<1,>=0.34.0
|
|
97
97
|
Requires-Dist: trio-websocket~=0.12.2
|
|
98
98
|
Requires-Dist: wsproto~=1.3.2
|
|
99
|
-
Requires-Dist: websocket-client~=1.9.
|
|
99
|
+
Requires-Dist: websocket-client~=1.9.2
|
|
100
100
|
Requires-Dist: selenium==4.48.0
|
|
101
101
|
Requires-Dist: cssselect<2,>=1.5.0
|
|
102
102
|
Requires-Dist: sortedcontainers==2.4.0
|
|
@@ -143,7 +143,12 @@ def start_browser(
|
|
|
143
143
|
|
|
144
144
|
@mcp.tool()
|
|
145
145
|
def close_browser() -> str:
|
|
146
|
-
"""Close the browser and end the session.
|
|
146
|
+
"""Close the browser and end the session.
|
|
147
|
+
This tool should be called after you have finished using the browser
|
|
148
|
+
so that you can conclude the session and free up any resources that
|
|
149
|
+
were being used by Chrome/Chromium. If you need to perform more
|
|
150
|
+
browser actions after using this tool, then you'll need to use the
|
|
151
|
+
'start_browser' tool again in order to begin a new browser session."""
|
|
147
152
|
global _sb
|
|
148
153
|
if _sb is None:
|
|
149
154
|
return "No browser session was running."
|
|
@@ -157,7 +162,12 @@ def close_browser() -> str:
|
|
|
157
162
|
|
|
158
163
|
@mcp.tool()
|
|
159
164
|
def browser_status() -> dict:
|
|
160
|
-
"""Return whether a browser session is currently active
|
|
165
|
+
"""Return whether a browser session is currently active, along with
|
|
166
|
+
the URL and title of the current page if the browser session is active.
|
|
167
|
+
This tool can be used for debugging, as well as for gathering basic
|
|
168
|
+
info on the current page. For instance, if a click action navigates
|
|
169
|
+
the browser window to a new page, you can use this tool to find out
|
|
170
|
+
the URL/title of the new page that the browser window navigated to."""
|
|
161
171
|
if _sb is None:
|
|
162
172
|
return {"running": False}
|
|
163
173
|
|
|
@@ -182,12 +192,13 @@ def browser_status() -> dict:
|
|
|
182
192
|
@handle_sb_errors
|
|
183
193
|
def navigate(url: str) -> str:
|
|
184
194
|
"""Navigate to the given URL in the web browser.
|
|
185
|
-
If the URL doesn't start with a protocol (eg:
|
|
186
|
-
|
|
195
|
+
If the URL doesn't start with a protocol (eg: "https://"),
|
|
196
|
+
then "https://"" is automatically prefixed in before navigation.
|
|
197
|
+
(eg: "seleniumbase.io" becomes "https://seleniumbase.io")
|
|
187
198
|
Waits until the initial HTML document is fully parsed and loaded.
|
|
188
199
|
New pages visited will show up in browser navigation history.
|
|
189
200
|
If the URL is invalid or the page can't load due to an issue,
|
|
190
|
-
|
|
201
|
+
then the corresponding errors will be raised."""
|
|
191
202
|
_get_sb().get(url)
|
|
192
203
|
return f"Navigated to {url}"
|
|
193
204
|
|
|
@@ -197,9 +208,31 @@ def navigate(url: str) -> str:
|
|
|
197
208
|
def navigate_history(
|
|
198
209
|
action: Literal["back", "forward", "reload"] = "back",
|
|
199
210
|
) -> str:
|
|
200
|
-
"""
|
|
211
|
+
"""Navigate through the current browser history or reload the current page.
|
|
212
|
+
Use this tool to move backward or forward through pages already visited in
|
|
213
|
+
the current browser session, or to reload the current page when its latest
|
|
214
|
+
content should be fetched again. This is useful for returning to a
|
|
215
|
+
previously visited page, retracing browser navigation, recovering from
|
|
216
|
+
accidental navigation, or refreshing page content.
|
|
201
217
|
Args:
|
|
202
|
-
action:
|
|
218
|
+
action: The browser navigation operation to perform:
|
|
219
|
+
- "back": Navigate to the previous page in the browser history.
|
|
220
|
+
Has no effect if there is no previous history entry.
|
|
221
|
+
- "forward": Navigate to the next page in the browser history.
|
|
222
|
+
Has no effect if there is no forward history entry.
|
|
223
|
+
- "reload": Reload the current page while ignoring the browser
|
|
224
|
+
cache, forcing the page resources to be fetched again.
|
|
225
|
+
Returns:
|
|
226
|
+
A confirmation message describing the navigation operation that was
|
|
227
|
+
performed.
|
|
228
|
+
Notes:
|
|
229
|
+
These operations modify the current browser page and may trigger page
|
|
230
|
+
loads, redirects, or other navigation events. After navigation, use
|
|
231
|
+
page-information or page-content tools when you need to verify the
|
|
232
|
+
resulting URL, title, or page state.
|
|
233
|
+
"back" and "forward" operate on the browser's existing navigation
|
|
234
|
+
history; they do not navigate to an arbitrary URL. "reload" stays on
|
|
235
|
+
the current page but bypasses the browser cache.
|
|
203
236
|
"""
|
|
204
237
|
sb = _get_sb()
|
|
205
238
|
if action == "back":
|
|
@@ -220,7 +253,22 @@ def navigate_history(
|
|
|
220
253
|
@mcp.tool()
|
|
221
254
|
@handle_sb_errors
|
|
222
255
|
def get_page_info() -> dict | str:
|
|
223
|
-
"""Get
|
|
256
|
+
"""Get comprehensive information about the current browser page.
|
|
257
|
+
Returns the current URL, document title, origin, and navigation history.
|
|
258
|
+
Use this tool after navigation or page interactions when you need to verify
|
|
259
|
+
where the browser is currently located, identify the loaded page, determine
|
|
260
|
+
the site's origin, or inspect how the browser reached the current page.
|
|
261
|
+
Returns:
|
|
262
|
+
A dictionary containing:
|
|
263
|
+
- url: The current page URL, including the path and query string.
|
|
264
|
+
- title: The current document title.
|
|
265
|
+
- origin: The page origin (scheme, host, and port), useful for
|
|
266
|
+
identifying the current website or comparing cross-origin navigation.
|
|
267
|
+
- history: The browser's navigation history, useful for understanding
|
|
268
|
+
the sequence of pages visited during the current session.
|
|
269
|
+
This is a read-only operation and does not navigate, reload, or modify
|
|
270
|
+
the current page.
|
|
271
|
+
"""
|
|
224
272
|
sb = _get_sb()
|
|
225
273
|
return {
|
|
226
274
|
"url": sb.get_current_url(),
|
|
@@ -238,15 +286,14 @@ def get_page_info() -> dict | str:
|
|
|
238
286
|
@handle_sb_errors
|
|
239
287
|
def find_elements(
|
|
240
288
|
selector: str,
|
|
241
|
-
timeout: int | None = 7,
|
|
289
|
+
timeout: int | float | None = 7,
|
|
242
290
|
include_html: bool = False,
|
|
243
291
|
) -> dict | str:
|
|
244
292
|
"""Find element(s) matching a CSS selector or visible text, and return
|
|
245
293
|
their tag name, text, and outer HTML (optional).
|
|
246
294
|
Args:
|
|
247
|
-
selector: CSS selector, or text to search for (CDP
|
|
248
|
-
elements by visible text
|
|
249
|
-
'a:contains("Sign in")').
|
|
295
|
+
selector: CSS selector, or text to search for (CDP Mode can match
|
|
296
|
+
elements by selector or visible text, eg. 'a:contains("Sign in")').
|
|
250
297
|
timeout: Seconds to wait for at least one match to appear.
|
|
251
298
|
include_html: Whether to include the html with each matching element.
|
|
252
299
|
Returns a dict with 'count' (total matches found) and 'matches' (a list
|
|
@@ -286,6 +333,7 @@ def get_page_content(
|
|
|
286
333
|
include_shadow_dom: bool = True,
|
|
287
334
|
) -> str:
|
|
288
335
|
"""Get the visible text or HTML of an element, or of the whole page.
|
|
336
|
+
You can optionally include any shadow-root elements (default: True).
|
|
289
337
|
Args:
|
|
290
338
|
selector: Element to read from. Omit (or pass None) to read the
|
|
291
339
|
whole page instead of one element.
|
|
@@ -306,7 +354,10 @@ def get_page_content(
|
|
|
306
354
|
@handle_sb_errors
|
|
307
355
|
def get_attributes(selector: str, attribute: str | None = None) -> Any:
|
|
308
356
|
"""Get one attribute's value from an element, or all of its attributes
|
|
309
|
-
as a dict if `attribute` isn't given.
|
|
357
|
+
as a dict if `attribute` isn't given.
|
|
358
|
+
Args:
|
|
359
|
+
selector: The CSS selector of the element to get the attribute from.
|
|
360
|
+
attribute: The HTML attribute of the element that you want to get."""
|
|
310
361
|
sb = _get_sb()
|
|
311
362
|
if attribute:
|
|
312
363
|
return sb.get_element_attribute(selector, attribute)
|
|
@@ -353,9 +404,13 @@ def check_state(
|
|
|
353
404
|
|
|
354
405
|
@mcp.tool()
|
|
355
406
|
@handle_sb_errors
|
|
356
|
-
def get_all_urls(
|
|
357
|
-
"""Get all linked URLs (a, link, img, script, meta) on the page.
|
|
358
|
-
|
|
407
|
+
def get_all_urls() -> list[str] | str:
|
|
408
|
+
"""Get a list of all linked URLs (a, link, img, script, meta) on the page.
|
|
409
|
+
The full URL with the prefix will be returned for each item in the list.
|
|
410
|
+
Eg: `["https://seleniumbase.io", "https://seleniumbase.com"]`.
|
|
411
|
+
Depending on the element, the URL could be obtained via "href" or "src".
|
|
412
|
+
This is useful for web-crawlers when looking for more links to crawl."""
|
|
413
|
+
return _get_sb().get_all_urls()
|
|
359
414
|
|
|
360
415
|
|
|
361
416
|
# ---------------------------------------------------------------------------
|
|
@@ -370,7 +425,7 @@ def click(
|
|
|
370
425
|
all_matches: bool = False,
|
|
371
426
|
only_if_visible: bool = False,
|
|
372
427
|
parent_selector: str | None = None,
|
|
373
|
-
timeout: int | None = 7,
|
|
428
|
+
timeout: int | float | None = 7,
|
|
374
429
|
scroll: bool = True,
|
|
375
430
|
) -> str:
|
|
376
431
|
"""Click an element matched by a CSS selector, or by visible text
|
|
@@ -417,6 +472,8 @@ def hover(selector: str, then_click_selector: str | None = None) -> str:
|
|
|
417
472
|
"""Simulate a mouse hover over an element,
|
|
418
473
|
optionally then clicking a second element that the hover reveals
|
|
419
474
|
(e.g. an item in a dropdown menu).
|
|
475
|
+
This is useful when clicking an item in a dropdown menu that requires
|
|
476
|
+
a hover action for the dropdown list of options to appear.
|
|
420
477
|
Args:
|
|
421
478
|
selector: Element to hover over.
|
|
422
479
|
then_click_selector: If given, click this element after hovering.
|
|
@@ -432,7 +489,14 @@ def hover(selector: str, then_click_selector: str | None = None) -> str:
|
|
|
432
489
|
@mcp.tool()
|
|
433
490
|
@handle_sb_errors
|
|
434
491
|
def drag_and_drop(source_selector: str, target_selector: str) -> str:
|
|
435
|
-
"""Drag
|
|
492
|
+
"""Drag a "draggable" element and drop it onto another element
|
|
493
|
+
by simulating mouse actions via the Chrome DevTools Protocol (CDP).
|
|
494
|
+
`source_selector` and `target_selector` should be CSS selectors.
|
|
495
|
+
A wide range of events are simulated to get the most natural
|
|
496
|
+
drag-and-drop effect, which include "pointerdown", "mousedown",
|
|
497
|
+
"dragstart", "dragenter", "dragover", "drop", "dragend", "mouseup",
|
|
498
|
+
and "pointerup", in that specific order.
|
|
499
|
+
"""
|
|
436
500
|
_get_sb().drag_and_drop(source_selector, target_selector)
|
|
437
501
|
return f"Dragged {source_selector} onto {target_selector}"
|
|
438
502
|
|
|
@@ -449,7 +513,7 @@ def fill_input(
|
|
|
449
513
|
"fast_type",
|
|
450
514
|
"clear",
|
|
451
515
|
] = "type",
|
|
452
|
-
timeout: int | None = 7,
|
|
516
|
+
timeout: int | float | None = 7,
|
|
453
517
|
) -> str:
|
|
454
518
|
"""Set the value of an input, textarea, or contenteditable element.
|
|
455
519
|
If no `timeout` given (0 or None), then SeleniumBase uses 7 seconds.
|
|
@@ -523,6 +587,16 @@ def element_action(
|
|
|
523
587
|
action: 'focus' (move keyboard focus to it), 'highlight' (briefly
|
|
524
588
|
flash it using JavaScript — useful for narrating actions
|
|
525
589
|
on a visible/headed browser), or 'scroll_into_view'.
|
|
590
|
+
The "focus" action is useful when an element isn't fully interactable
|
|
591
|
+
until the element is in focus.
|
|
592
|
+
The "highlight" action is mainly for debugging and demoing purposes.
|
|
593
|
+
It briefly changes the border color of an element so that a human
|
|
594
|
+
watching the web browser can have their attention be called to
|
|
595
|
+
that specific element being highlighted. This "highlight" action
|
|
596
|
+
briefly slows the automation during the action. This action may
|
|
597
|
+
also reduce stealth on some websites, which may be undesirable.
|
|
598
|
+
The "scroll_into_view" action scrolls the page to the element if the
|
|
599
|
+
element is not currently in view at the current scroll position.
|
|
526
600
|
"""
|
|
527
601
|
sb = _get_sb()
|
|
528
602
|
if action == "focus":
|
|
@@ -549,7 +623,7 @@ def wait_for(
|
|
|
549
623
|
state: Literal["present", "visible", "not_visible", "absent"] = "visible",
|
|
550
624
|
selector: str | None = None,
|
|
551
625
|
text: str | None = None,
|
|
552
|
-
timeout: int | None = 7,
|
|
626
|
+
timeout: int | float | None = 7,
|
|
553
627
|
) -> str:
|
|
554
628
|
"""Wait for an element or text to reach a given state before returning.
|
|
555
629
|
If no `timeout` given (0 or None), then SeleniumBase uses 7 seconds.
|
|
@@ -599,7 +673,7 @@ def assert_that(
|
|
|
599
673
|
selector: str | None = None,
|
|
600
674
|
expected: str | None = None,
|
|
601
675
|
exact: bool = False,
|
|
602
|
-
timeout: int | None = 7,
|
|
676
|
+
timeout: int | float | None = 7,
|
|
603
677
|
) -> str:
|
|
604
678
|
"""Assert a condition about the page or an element. Raises an exception
|
|
605
679
|
(surfaced back as an error string) if the assertion fails within the
|
|
@@ -659,14 +733,49 @@ def assert_that(
|
|
|
659
733
|
@handle_sb_errors
|
|
660
734
|
def manage_cookies(
|
|
661
735
|
action: Literal["get_all", "clear", "save", "load"] = "get_all",
|
|
662
|
-
filename: str = "cookies.txt"
|
|
736
|
+
filename: str = "cookies.txt",
|
|
663
737
|
) -> Any:
|
|
664
|
-
"""
|
|
738
|
+
"""Manage cookies for the current browser session.
|
|
739
|
+
Use this tool to inspect, clear, save, or restore browser cookies. Cookie
|
|
740
|
+
management is useful for inspecting session state, preserving login
|
|
741
|
+
sessions between browser runs, restoring previously saved sessions, or
|
|
742
|
+
resetting website state during testing.
|
|
665
743
|
Args:
|
|
666
|
-
action:
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
744
|
+
action: The cookie operation to perform:
|
|
745
|
+
- "get_all": Return all cookies currently available to the browser,
|
|
746
|
+
including cookie attributes such as name, value, domain, path,
|
|
747
|
+
expiry, and security flags.
|
|
748
|
+
- "clear": Delete all cookies from the current browser session.
|
|
749
|
+
Useful for resetting authentication and website state.
|
|
750
|
+
- "save": Save the current browser cookies to `filename` so they
|
|
751
|
+
can be restored in a later browser session. The file may be
|
|
752
|
+
created or overwritten.
|
|
753
|
+
- "load": Load cookies from `filename` into the current browser
|
|
754
|
+
session. Useful for restoring previously saved authentication or
|
|
755
|
+
session state.
|
|
756
|
+
filename: Path used by the "save" and "load" actions. Defaults to
|
|
757
|
+
"cookies.txt". This argument is ignored for "get_all" and "clear".
|
|
758
|
+
The path is passed to SeleniumBase's cookie persistence methods.
|
|
759
|
+
Returns:
|
|
760
|
+
"get_all": The current browser cookies.
|
|
761
|
+
"clear": A confirmation message after cookies are cleared.
|
|
762
|
+
"save": A confirmation message containing the destination filename.
|
|
763
|
+
"load": A confirmation message containing the source filename.
|
|
764
|
+
Security:
|
|
765
|
+
Cookie data can contain sensitive authentication credentials, session
|
|
766
|
+
identifiers, and other private information. Only inspect, save, load,
|
|
767
|
+
or share cookies when explicitly authorized.
|
|
768
|
+
`filename` can access the filesystem available to the MCP server.
|
|
769
|
+
Use only trusted and authorized file paths. The "save" action may
|
|
770
|
+
overwrite an existing file, so avoid unintended or sensitive
|
|
771
|
+
destinations.
|
|
772
|
+
Notes:
|
|
773
|
+
Cookies belong to the current browser session. Loading previously
|
|
774
|
+
saved cookies does not guarantee that a login session will be
|
|
775
|
+
restored because cookies may be expired, invalidated, domain-specific,
|
|
776
|
+
or dependent on other browser state. Navigate to the appropriate
|
|
777
|
+
website before loading cookies when the browser must associate them
|
|
778
|
+
with a particular domain.
|
|
670
779
|
"""
|
|
671
780
|
sb = _get_sb()
|
|
672
781
|
if action == "get_all":
|
|
@@ -696,10 +805,19 @@ def manage_storage(
|
|
|
696
805
|
) -> Any:
|
|
697
806
|
"""Get or set a key in the page's localStorage or sessionStorage.
|
|
698
807
|
Args:
|
|
699
|
-
|
|
808
|
+
key: The localStorage or sessionStorage key to use.
|
|
809
|
+
value: The value to set when using 'set' as the `action`.
|
|
810
|
+
storage: 'local' (localStorage) or 'session' (sessionStorage).
|
|
700
811
|
action: 'get' or 'set'. ('set' requires `value`).
|
|
701
|
-
|
|
702
|
-
|
|
812
|
+
Use this tool for managing localStorage and/or sessionStorage.
|
|
813
|
+
Storage is managed via the simple JavaScript calls listed below:
|
|
814
|
+
`localStorage.getItem(key)`
|
|
815
|
+
`sessionStorage.getItem(key)`
|
|
816
|
+
`localStorage.setItem(key, value)`
|
|
817
|
+
`sessionStorage.setItem(key, value)`
|
|
818
|
+
WARNING: This tool can expose authentication/session secrets that
|
|
819
|
+
are are stored in localStorage/sessionStorage on the site.
|
|
820
|
+
Only use against trusted sites and with trusted MCP clients.
|
|
703
821
|
"""
|
|
704
822
|
sb = _get_sb()
|
|
705
823
|
if action not in ("get", "set"):
|
|
@@ -729,10 +847,15 @@ def scroll(
|
|
|
729
847
|
direction: Literal["up", "down", "top", "bottom"] = "down",
|
|
730
848
|
amount: int = 25,
|
|
731
849
|
) -> str:
|
|
732
|
-
"""Scroll the page.
|
|
850
|
+
"""Scroll the page by the given amount or to the location given.
|
|
733
851
|
Args:
|
|
734
852
|
direction: 'up' or 'down' (relative, by `amount`), 'top', or 'bottom'.
|
|
735
853
|
amount: Relative scroll distance; only used for 'up'/'down'.
|
|
854
|
+
When scrolling with `direction` 'up' or 'down', the `amount` represents
|
|
855
|
+
a percentage of the window height. (Eg. 'down' with `amount` 25 means
|
|
856
|
+
scroll the page down by 25% of the current window height.) If setting the
|
|
857
|
+
`direction` to 'top' or 'bottom', then the 'amount' value is ignored. 'top'
|
|
858
|
+
scrolls to the top of the page. 'bottom' scrolls to the bottom of the page.
|
|
736
859
|
"""
|
|
737
860
|
sb = _get_sb()
|
|
738
861
|
if direction == "up":
|
|
@@ -773,6 +896,15 @@ def manage_window(
|
|
|
773
896
|
Args:
|
|
774
897
|
action: 'get_rect', 'set_rect' (requires x, y, width, height),
|
|
775
898
|
'maximize', or 'minimize'.
|
|
899
|
+
x: The x position on screen for the 'set_rect' `action` only.
|
|
900
|
+
y: The y position on screen for the 'set_rect' `action` only.
|
|
901
|
+
width: The window width for the 'set_rect' `action` only.
|
|
902
|
+
height: The window height for the 'set_rect' `action` only.
|
|
903
|
+
The 'get_rect' action returns the coordinates of the browser window.
|
|
904
|
+
The 'set_rect' action lets you set new coordinates for the browser window.
|
|
905
|
+
The 'maximize' action maximizes the current browser window.
|
|
906
|
+
The 'minimize' action minimizes the current browser window.
|
|
907
|
+
The Chrome DevTools Protocol (CDP) is used to change the window state.
|
|
776
908
|
"""
|
|
777
909
|
sb = _get_sb()
|
|
778
910
|
if action == "get_rect":
|
|
@@ -817,6 +949,12 @@ def manage_tabs(
|
|
|
817
949
|
url: Used with action='open'.
|
|
818
950
|
tab_index: Used with action='switch'; the index as returned by 'list'.
|
|
819
951
|
switch_to: Used with action='open'; whether to switch to the new tab.
|
|
952
|
+
Since performing browser actions (such as clicking on a link) can open new
|
|
953
|
+
tabs, it is important to keep track of any new tabs opened so that you can
|
|
954
|
+
switch to the new tab as needed (or close the active tab). Additionally,
|
|
955
|
+
you may want to open a new tab yourself if you need to use multiple tabs
|
|
956
|
+
within the same browser session. Listing tabs with the 'list' `action` is
|
|
957
|
+
important so that your 'tab_index' for switching tabs is not out-of-range.
|
|
820
958
|
"""
|
|
821
959
|
sb = _get_sb()
|
|
822
960
|
if action == "list":
|
|
@@ -864,9 +1002,24 @@ def manage_tabs(
|
|
|
864
1002
|
@mcp.tool()
|
|
865
1003
|
@handle_sb_errors
|
|
866
1004
|
def solve_captcha() -> str:
|
|
867
|
-
"""Attempt to solve a CAPTCHA (e.g. Cloudflare Turnstile) on the page.
|
|
1005
|
+
"""Attempt to solve a CAPTCHA (e.g. Cloudflare Turnstile) on the page.
|
|
1006
|
+
This tool uses the Chrome DevTools Protocol (CDP) in order to perform
|
|
1007
|
+
a click (with offset) in order to click the checkbox that's located
|
|
1008
|
+
in various CAPTCHAs such as Cloudflare Turnstile, reCAPTCHA, and the
|
|
1009
|
+
FriendlyCaptcha. Since this click is performed with CDP, it is much
|
|
1010
|
+
stealthier than JavaScript clicks that set 'isTrusted' to False.
|
|
1011
|
+
Since many of these CAPTCHAs are generally located inside shadow-root
|
|
1012
|
+
elements, it is not straightforward to determine if the click succeeded.
|
|
1013
|
+
Therefore, this tool will only state that it attempted to solve a
|
|
1014
|
+
CAPTCHA, rather than state the result. Since solving a Cloudflare
|
|
1015
|
+
Turnstile CAPTCHA often results in a "cf_clearance" cookie appearing
|
|
1016
|
+
within browser cookies, a follow-up to this tool could involve using
|
|
1017
|
+
the 'manage_cookies' tool to see if that "cf_clearance" cookie appeared
|
|
1018
|
+
after using this method to solve that CAPTCHA. To determine if there's
|
|
1019
|
+
a CAPTCHA on the page before using this tool, you could first use the
|
|
1020
|
+
'get_page_content' tool to inspect the page HTML for any CAPTCHAs."""
|
|
868
1021
|
_get_sb().solve_captcha()
|
|
869
|
-
return "Attempted
|
|
1022
|
+
return "Attempted CAPTCHA solve."
|
|
870
1023
|
|
|
871
1024
|
|
|
872
1025
|
# ---------------------------------------------------------------------------
|
|
@@ -889,8 +1042,14 @@ def save_output(
|
|
|
889
1042
|
If 'screenshot' format, then the page is saved as a PNG (.png) file.
|
|
890
1043
|
If 'html' format, then the page source is saved to an HTML (.html) file.
|
|
891
1044
|
If 'pdf' format, then the page is saved as a PDF (.pdf) file.
|
|
1045
|
+
This method is useful for creating artifacts as a result of scraping data
|
|
1046
|
+
from websites. This is especially important for saving results and data
|
|
1047
|
+
to your local machine for further processing. (For example, if this MCP
|
|
1048
|
+
server is being used for automated testing, then if this server finds a
|
|
1049
|
+
bug on a website, then it can save all the details to the local machine
|
|
1050
|
+
using any of this tool's supported formats: "screenshot", "html", "pdf".)
|
|
892
1051
|
SECURITY: `filename`/`folder` can potentially expose filesystem operations
|
|
893
|
-
to an MCP client. Existing files could get overwritten
|
|
1052
|
+
to an MCP client. Existing files could get overwritten during a save.
|
|
894
1053
|
"""
|
|
895
1054
|
sb = _get_sb()
|
|
896
1055
|
if format == "screenshot":
|
|
@@ -915,6 +1074,11 @@ def save_output(
|
|
|
915
1074
|
def run_javascript(expression: str) -> Any:
|
|
916
1075
|
"""Evaluate a JavaScript expression in the page context and return the
|
|
917
1076
|
result. This method can run any arbitrary JavaScript on any visited site.
|
|
1077
|
+
JavaScript evaluation is handled by the 'Runtime.evaluate' function of the
|
|
1078
|
+
Chrome DevTools Protocol (CDP). When CDP's `Runtime.evaluate` function is
|
|
1079
|
+
called, it also sets these optional parameters: 'returnByValue' to True,
|
|
1080
|
+
'userGesture' to True, 'allowUnsafeEvalBlockedByCSP' to True, and
|
|
1081
|
+
'awaitPromise' to True. See the Chrome DevTools Protocol docs for details.
|
|
918
1082
|
SECURITY: This provides unrestricted JavaScript execution in the browser
|
|
919
1083
|
context. Only expose this MCP server to trusted clients."""
|
|
920
1084
|
return _get_sb().evaluate(expression)
|
|
@@ -922,8 +1086,11 @@ def run_javascript(expression: str) -> Any:
|
|
|
922
1086
|
|
|
923
1087
|
@mcp.tool()
|
|
924
1088
|
@handle_sb_errors
|
|
925
|
-
def wait_seconds(seconds: float) -> str:
|
|
926
|
-
"""Pause execution for a
|
|
1089
|
+
def wait_seconds(seconds: int | float) -> str:
|
|
1090
|
+
"""Pause script execution for a duration of seconds (int or float).
|
|
1091
|
+
All this does is call Python `time.sleep(seconds)` in the backend.
|
|
1092
|
+
It is blocking behavior - no actions are performed while waiting.
|
|
1093
|
+
Don't use this if you need to call other tools during the wait."""
|
|
927
1094
|
_get_sb().sleep(seconds)
|
|
928
1095
|
return f"Waited {seconds}s"
|
|
929
1096
|
|
|
@@ -7,7 +7,7 @@ certifi>=2026.7.22
|
|
|
7
7
|
exceptiongroup>=1.3.1
|
|
8
8
|
websockets~=16.1.1;python_version=="3.10"
|
|
9
9
|
websockets>=16.1.1;python_version>="3.11"
|
|
10
|
-
filelock>=3.32.
|
|
10
|
+
filelock>=3.32.5
|
|
11
11
|
fasteners>=0.20
|
|
12
12
|
mycdp>=1.4.0
|
|
13
13
|
pynose>=1.5.5
|
|
@@ -36,7 +36,7 @@ outcome==1.3.0.post0
|
|
|
36
36
|
trio>=0.34.0,<1
|
|
37
37
|
trio-websocket~=0.12.2
|
|
38
38
|
wsproto~=1.3.2
|
|
39
|
-
websocket-client~=1.9.
|
|
39
|
+
websocket-client~=1.9.2
|
|
40
40
|
selenium==4.48.0
|
|
41
41
|
cssselect>=1.5.0,<2
|
|
42
42
|
sortedcontainers==2.4.0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# seleniumbase package
|
|
2
|
-
__version__ = "4.53.
|
|
2
|
+
__version__ = "4.53.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: seleniumbase
|
|
3
|
-
Version: 4.53.
|
|
3
|
+
Version: 4.53.2
|
|
4
4
|
Summary: SeleniumBase is a framework for web crawling, scraping, and testing. Supports pytest. CDP Mode adds stealth. Includes many tools.
|
|
5
5
|
Home-page: https://github.com/seleniumbase/SeleniumBase
|
|
6
6
|
Author: Michael Mintz
|
|
@@ -16,7 +16,7 @@ Project-URL: PyPI, https://pypi.org/project/seleniumbase/
|
|
|
16
16
|
Project-URL: Source, https://github.com/seleniumbase/SeleniumBase
|
|
17
17
|
Project-URL: Repository, https://github.com/seleniumbase/SeleniumBase
|
|
18
18
|
Project-URL: Documentation, https://seleniumbase.io/
|
|
19
|
-
Keywords: pytest,selenium,framework,automation,browser,testing,webdriver,seleniumbase,sbase,web-crawling,web-scraping,stealth,chromium,playwright,anti-detection,captcha-bypass,
|
|
19
|
+
Keywords: cdp,mcp,pytest,selenium,framework,automation,browser,testing,webdriver,seleniumbase,sbase,web-crawling,web-scraping,stealth,chromium,playwright,anti-detection,captcha-bypass,ai-agent,llm-tools,model-context-protocol
|
|
20
20
|
Platform: Windows
|
|
21
21
|
Platform: Linux
|
|
22
22
|
Platform: Mac OS-X
|
|
@@ -67,7 +67,7 @@ Requires-Dist: certifi>=2026.7.22
|
|
|
67
67
|
Requires-Dist: exceptiongroup>=1.3.1
|
|
68
68
|
Requires-Dist: websockets~=16.1.1; python_version == "3.10"
|
|
69
69
|
Requires-Dist: websockets>=16.1.1; python_version >= "3.11"
|
|
70
|
-
Requires-Dist: filelock>=3.32.
|
|
70
|
+
Requires-Dist: filelock>=3.32.5
|
|
71
71
|
Requires-Dist: fasteners>=0.20
|
|
72
72
|
Requires-Dist: mycdp>=1.4.0
|
|
73
73
|
Requires-Dist: pynose>=1.5.5
|
|
@@ -96,7 +96,7 @@ Requires-Dist: outcome==1.3.0.post0
|
|
|
96
96
|
Requires-Dist: trio<1,>=0.34.0
|
|
97
97
|
Requires-Dist: trio-websocket~=0.12.2
|
|
98
98
|
Requires-Dist: wsproto~=1.3.2
|
|
99
|
-
Requires-Dist: websocket-client~=1.9.
|
|
99
|
+
Requires-Dist: websocket-client~=1.9.2
|
|
100
100
|
Requires-Dist: selenium==4.48.0
|
|
101
101
|
Requires-Dist: cssselect<2,>=1.5.0
|
|
102
102
|
Requires-Dist: sortedcontainers==2.4.0
|
|
@@ -5,7 +5,7 @@ wheel>=0.48.0
|
|
|
5
5
|
attrs>=26.1.0
|
|
6
6
|
certifi>=2026.7.22
|
|
7
7
|
exceptiongroup>=1.3.1
|
|
8
|
-
filelock>=3.32.
|
|
8
|
+
filelock>=3.32.5
|
|
9
9
|
fasteners>=0.20
|
|
10
10
|
mycdp>=1.4.0
|
|
11
11
|
pynose>=1.5.5
|
|
@@ -33,7 +33,7 @@ outcome==1.3.0.post0
|
|
|
33
33
|
trio<1,>=0.34.0
|
|
34
34
|
trio-websocket~=0.12.2
|
|
35
35
|
wsproto~=1.3.2
|
|
36
|
-
websocket-client~=1.9.
|
|
36
|
+
websocket-client~=1.9.2
|
|
37
37
|
selenium==4.48.0
|
|
38
38
|
cssselect<2,>=1.5.0
|
|
39
39
|
sortedcontainers==2.4.0
|
|
@@ -42,7 +42,9 @@ if sys.argv[-1] == "publish":
|
|
|
42
42
|
sys.exit()
|
|
43
43
|
print("\n*** Checking code health with flake8:\n")
|
|
44
44
|
os.system("python -m pip install 'flake8==7.3.0'")
|
|
45
|
-
flake8_status = os.system(
|
|
45
|
+
flake8_status = os.system(
|
|
46
|
+
"flake8 --exclude=recordings,temp,venv,.venv"
|
|
47
|
+
)
|
|
46
48
|
if flake8_status != 0:
|
|
47
49
|
print("\nERROR! Fix flake8 issues before publishing to PyPI!\n")
|
|
48
50
|
sys.exit()
|
|
@@ -101,6 +103,8 @@ setup(
|
|
|
101
103
|
maintainer="Michael Mintz",
|
|
102
104
|
license="MIT",
|
|
103
105
|
keywords=[
|
|
106
|
+
"cdp",
|
|
107
|
+
"mcp",
|
|
104
108
|
"pytest",
|
|
105
109
|
"selenium",
|
|
106
110
|
"framework",
|
|
@@ -117,10 +121,9 @@ setup(
|
|
|
117
121
|
"playwright",
|
|
118
122
|
"anti-detection",
|
|
119
123
|
"captcha-bypass",
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"headless",
|
|
124
|
+
"ai-agent",
|
|
125
|
+
"llm-tools",
|
|
126
|
+
"model-context-protocol",
|
|
124
127
|
],
|
|
125
128
|
classifiers=[
|
|
126
129
|
"Development Status :: 5 - Production/Stable",
|
|
@@ -170,7 +173,7 @@ setup(
|
|
|
170
173
|
'exceptiongroup>=1.3.1',
|
|
171
174
|
'websockets~=16.1.1;python_version=="3.10"',
|
|
172
175
|
'websockets>=16.1.1;python_version>="3.11"',
|
|
173
|
-
'filelock>=3.32.
|
|
176
|
+
'filelock>=3.32.5',
|
|
174
177
|
'fasteners>=0.20',
|
|
175
178
|
'mycdp>=1.4.0',
|
|
176
179
|
'pynose>=1.5.5',
|
|
@@ -199,7 +202,7 @@ setup(
|
|
|
199
202
|
'trio>=0.34.0,<1',
|
|
200
203
|
'trio-websocket~=0.12.2',
|
|
201
204
|
'wsproto~=1.3.2',
|
|
202
|
-
'websocket-client~=1.9.
|
|
205
|
+
'websocket-client~=1.9.2',
|
|
203
206
|
'selenium==4.48.0',
|
|
204
207
|
'cssselect>=1.5.0,<2',
|
|
205
208
|
'sortedcontainers==2.4.0',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|