seleniumbase 4.54.1__tar.gz → 4.54.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.54.1/seleniumbase.egg-info → seleniumbase-4.54.2}/PKG-INFO +2 -1
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/README.md +1 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/mcp_servers/server.py +80 -76
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/__version__.py +1 -1
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/sb_cdp.py +17 -7
- {seleniumbase-4.54.1 → seleniumbase-4.54.2/seleniumbase.egg-info}/PKG-INFO +2 -1
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/.gitignore +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/LICENSE +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/MANIFEST.in +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/install.sh +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/mcp_servers/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/pyproject.toml +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/pytest.ini +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/requirements.txt +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/sbase/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/sbase/__main__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/sbase/steps.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/__main__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/behave/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/behave/behave_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/behave/behave_sb.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/behave/steps.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/common/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/common/decorators.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/common/encryption.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/common/exceptions.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/common/obfuscate.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/common/unobfuscate.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/config/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/config/ad_block_list.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/config/proxy_list.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/config/settings.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/logo_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/rich_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/run.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/sb_behave_gui.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/sb_caseplans.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/sb_commander.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/sb_install.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/sb_mkchart.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/sb_mkdir.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/sb_mkfile.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/sb_mkpres.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/sb_mkrec.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/sb_objectify.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/sb_print.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/console_scripts/sb_recorder.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/application_manager.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/browser_launcher.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/capabilities_parser.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/colored_traceback.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/create_db_tables.sql +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/detect_b_ver.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/download_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/encoded_images.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/jqc_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/log_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/mysql.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/nest_asyncio.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/proxy_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/recorder_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/report_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/s3_manager.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/sb_driver.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/session_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/settings_parser.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/style_sheet.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/testcase_manager.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/tour_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/core/visual_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/drivers/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/drivers/brave_drivers/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/drivers/cft_drivers/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/drivers/chromium_drivers/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/drivers/chs_drivers/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/drivers/comet_drivers/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/drivers/opera_drivers/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/extensions/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/extensions/ad_block.zip +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/extensions/disable_csp.zip +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/extensions/recorder.zip +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/extensions/sbase_ext.zip +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/fixtures/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/fixtures/base_case.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/fixtures/constants.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/fixtures/css_to_xpath.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/fixtures/errors.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/fixtures/js_utils.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/fixtures/page_actions.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/fixtures/page_utils.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/fixtures/shared_utils.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/fixtures/unittest_helper.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/fixtures/words.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/fixtures/xpath_to_css.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/js_code/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/js_code/active_css_js.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/js_code/live_js.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/js_code/recorder_js.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/masterqa/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/masterqa/master_qa.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/plugins/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/plugins/base_plugin.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/plugins/basic_test_info.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/plugins/db_reporting_plugin.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/plugins/driver_manager.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/plugins/page_source.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/plugins/pytest_plugin.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/plugins/s3_logging_plugin.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/plugins/sb_manager.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/plugins/screen_shots.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/plugins/selenium_plugin.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/resources/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/translate/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/translate/chinese.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/translate/dutch.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/translate/french.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/translate/italian.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/translate/japanese.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/translate/korean.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/translate/master_dict.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/translate/portuguese.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/translate/russian.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/translate/spanish.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/translate/translator.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/cdp.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/cdp_driver/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/cdp_driver/_contradict.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/cdp_driver/browser.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/cdp_driver/cdp_util.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/cdp_driver/config.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/cdp_driver/connection.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/cdp_driver/element.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/cdp_driver/tab.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/dprocess.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/options.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/patcher.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/reactor.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/webelement.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/download_selenium_server.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/font_color +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/grid-hub +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/grid-node +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/grid_hub.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/grid_node.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/register-grid-node.bat +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/register-grid-node.sh +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/start-grid-hub.bat +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/start-grid-hub.sh +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_ide/__init__.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_ide/convert_ide.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase.egg-info/SOURCES.txt +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase.egg-info/dependency_links.txt +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase.egg-info/entry_points.txt +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase.egg-info/requires.txt +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase.egg-info/top_level.txt +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/setup.cfg +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/setup.py +0 -0
- {seleniumbase-4.54.1 → seleniumbase-4.54.2}/virtualenv_install.sh +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: seleniumbase
|
|
3
|
-
Version: 4.54.
|
|
3
|
+
Version: 4.54.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
|
|
@@ -171,6 +171,7 @@ Dynamic: requires-python
|
|
|
171
171
|
Dynamic: summary
|
|
172
172
|
|
|
173
173
|
<!-- SeleniumBase Docs -->
|
|
174
|
+
<!-- mcp-name: io.github.seleniumbase/seleniumbase -->
|
|
174
175
|
|
|
175
176
|
<meta property="og:site_name" content="SeleniumBase">
|
|
176
177
|
<meta property="og:title" content="SeleniumBase: Stealthy Chromium Automation with Python; and E2E Testing." />
|
|
@@ -446,10 +446,16 @@ def find_elements(
|
|
|
446
446
|
dictionaries. It does not return live SeleniumBase element objects.
|
|
447
447
|
|
|
448
448
|
Args:
|
|
449
|
-
selector: A
|
|
449
|
+
selector: A CSS selector, or an XPath selector that SeleniumBase can
|
|
450
|
+
convert to CSS. In sb.find_elements, SeleniumBase automatically
|
|
451
|
+
attempts to convert XPath to CSS. Some XPath expressions, such
|
|
452
|
+
as those using `contains(...)`, cannot be converted to CSS and
|
|
453
|
+
therefore aren't supported by this tool.
|
|
450
454
|
|
|
451
455
|
timeout: Maximum number of seconds to wait for at least one matching
|
|
452
|
-
element to appear.
|
|
456
|
+
element to appear. If the selector is an XPath selector that
|
|
457
|
+
cannot be converted into a valid CSS selector, then the wait
|
|
458
|
+
might be less than the timeout.
|
|
453
459
|
|
|
454
460
|
include_html: If True, include each matching element's outer HTML.
|
|
455
461
|
If False, return only tag name and text.
|
|
@@ -459,7 +465,8 @@ def find_elements(
|
|
|
459
465
|
- count: Number of matching elements found.
|
|
460
466
|
- matches: A list of element dictionaries containing tag_name and
|
|
461
467
|
text, plus html when include_html=True.
|
|
462
|
-
If there's an error,
|
|
468
|
+
If there's an error during search, then "error" is added into the
|
|
469
|
+
returned dictionary with error details.
|
|
463
470
|
|
|
464
471
|
Tool selection:
|
|
465
472
|
- Need structured information about matching elements ->
|
|
@@ -470,77 +477,63 @@ def find_elements(
|
|
|
470
477
|
- Need to know whether an element is present/visible ->
|
|
471
478
|
use check_condition.
|
|
472
479
|
|
|
473
|
-
|
|
480
|
+
Notes:
|
|
474
481
|
Element handles cannot be persisted across MCP calls. If you find
|
|
475
482
|
elements and then need to act on one, resolve it again with the
|
|
476
483
|
appropriate interaction tool.
|
|
484
|
+
|
|
485
|
+
For uncaught errors, @handle_sb_errors returns strings.
|
|
477
486
|
"""
|
|
478
487
|
sb = _get_sb()
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
488
|
+
try:
|
|
489
|
+
elements = sb.find_elements(selector, timeout=timeout)
|
|
490
|
+
except Exception as e:
|
|
482
491
|
return {
|
|
483
|
-
"count":
|
|
484
|
-
"matches": [
|
|
485
|
-
|
|
486
|
-
"tag_name": element.tag_name,
|
|
487
|
-
"text": element.text,
|
|
488
|
-
"html": element.get_html(),
|
|
489
|
-
}
|
|
490
|
-
for element in elements
|
|
491
|
-
],
|
|
492
|
+
"count": 0,
|
|
493
|
+
"matches": [],
|
|
494
|
+
"error": str(e),
|
|
492
495
|
}
|
|
493
496
|
|
|
497
|
+
matches = []
|
|
498
|
+
for element in elements:
|
|
499
|
+
match = {
|
|
500
|
+
"tag_name": element.tag_name,
|
|
501
|
+
"text": element.text,
|
|
502
|
+
}
|
|
503
|
+
if include_html:
|
|
504
|
+
match["html"] = element.get_html()
|
|
505
|
+
matches.append(match)
|
|
506
|
+
|
|
494
507
|
return {
|
|
495
|
-
"count": len(
|
|
496
|
-
"matches":
|
|
497
|
-
{
|
|
498
|
-
"tag_name": element.tag_name,
|
|
499
|
-
"text": element.text,
|
|
500
|
-
}
|
|
501
|
-
for element in elements
|
|
502
|
-
],
|
|
508
|
+
"count": len(matches),
|
|
509
|
+
"matches": matches,
|
|
503
510
|
}
|
|
504
511
|
|
|
505
512
|
|
|
506
513
|
@mcp.tool()
|
|
507
514
|
@handle_sb_errors
|
|
508
515
|
def get_content(
|
|
509
|
-
selector: str
|
|
516
|
+
selector: str = "body",
|
|
510
517
|
output_format: Literal["text", "html", "urls"] = "text",
|
|
511
|
-
|
|
518
|
+
timeout: float = 5,
|
|
512
519
|
) -> str | list[str]:
|
|
513
|
-
"""Read visible text, HTML, or discovered URLs from the
|
|
520
|
+
"""Read visible text, HTML, or discovered URLs from the selected element.
|
|
514
521
|
|
|
515
|
-
Use this tool when you need actual page content or URL information
|
|
516
|
-
than page metadata.
|
|
522
|
+
Use this tool when you need to get actual page content or URL information
|
|
523
|
+
rather than page metadata.
|
|
517
524
|
|
|
518
525
|
Args:
|
|
519
|
-
selector:
|
|
520
|
-
identifying the element whose content should be read. For
|
|
521
|
-
output_format="text" or "html", the selector scopes the returned
|
|
522
|
-
content to that element. For output_format="urls", the selector
|
|
523
|
-
scopes URL discovery to URLs within that element. When omitted,
|
|
524
|
-
the operation applies to the whole page.
|
|
526
|
+
selector: CSS selector or SeleniumBase-supported XPath selector.
|
|
525
527
|
|
|
526
528
|
output_format:
|
|
527
|
-
- "text": Return visible text from the
|
|
528
|
-
- "html": Return HTML from the
|
|
529
|
-
- "urls": Return URLs discovered by SeleniumBase
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
SeleniumBase returns full URLs with their URL protocol prefixes.
|
|
529
|
+
- "text": Return visible text from the selected element.
|
|
530
|
+
- "html": Return HTML from the selected element.
|
|
531
|
+
- "urls": Return URLs discovered by SeleniumBase within the
|
|
532
|
+
selected element. Returned URLs are normalized to full URLs
|
|
533
|
+
with their protocol prefixes.
|
|
533
534
|
|
|
534
|
-
include_shadow_dom: When output_format="html" and selector is omitted,
|
|
535
|
-
include any shadow-root HTML present in the page. This option has
|
|
536
|
-
no effect for "text" or "urls", or when a selector is specified.
|
|
537
535
|
|
|
538
|
-
|
|
539
|
-
For output_format="text", a string containing visible text.
|
|
540
|
-
For output_format="html", a string containing HTML.
|
|
541
|
-
For output_format="urls", a list of URL strings. This is useful for
|
|
542
|
-
crawling, link discovery, resource inspection, and finding candidate
|
|
543
|
-
URLs before navigating to them.
|
|
536
|
+
timeout: Maximum seconds to wait for the target element. Default: 5.
|
|
544
537
|
|
|
545
538
|
Tool selection:
|
|
546
539
|
- Need URL, title, origin, or User-Agent -> use get_page_info.
|
|
@@ -554,20 +547,19 @@ def get_content(
|
|
|
554
547
|
"""
|
|
555
548
|
sb = _get_sb()
|
|
556
549
|
|
|
557
|
-
if output_format == "
|
|
558
|
-
return sb.
|
|
559
|
-
|
|
560
|
-
if selector is None:
|
|
561
|
-
if output_format == "html":
|
|
562
|
-
return sb.get_page_source(
|
|
563
|
-
include_shadow_dom=include_shadow_dom
|
|
564
|
-
)
|
|
565
|
-
return sb.get_text("body")
|
|
550
|
+
if output_format == "text":
|
|
551
|
+
return sb.get_text(selector, timeout=timeout)
|
|
566
552
|
|
|
567
553
|
if output_format == "html":
|
|
568
|
-
return sb.get_element_html(selector)
|
|
554
|
+
return sb.get_element_html(selector, timeout=timeout)
|
|
569
555
|
|
|
570
|
-
|
|
556
|
+
if output_format == "urls":
|
|
557
|
+
return sb.get_all_urls(selector=selector, timeout=timeout)
|
|
558
|
+
|
|
559
|
+
return (
|
|
560
|
+
f"Error: unknown output_format '{output_format}'. "
|
|
561
|
+
"Use 'text', 'html', or 'urls'."
|
|
562
|
+
)
|
|
571
563
|
|
|
572
564
|
|
|
573
565
|
@mcp.tool()
|
|
@@ -575,22 +567,24 @@ def get_content(
|
|
|
575
567
|
def get_attributes(
|
|
576
568
|
selector: str,
|
|
577
569
|
attribute: str | None = None,
|
|
578
|
-
|
|
579
|
-
|
|
570
|
+
timeout: float = 5,
|
|
571
|
+
) -> str | dict[str, Any] | None:
|
|
572
|
+
"""Read HTML attributes from the first matching element.
|
|
580
573
|
|
|
581
|
-
Use this tool when you need the value of
|
|
582
|
-
|
|
574
|
+
Use this tool when you need the value of a specific HTML attribute,
|
|
575
|
+
or all HTML attributes of an element. Attributes could be something
|
|
576
|
+
such as href, src, value, class, id, name, type, aria-label, etc.
|
|
583
577
|
|
|
584
578
|
Args:
|
|
585
|
-
selector: CSS selector or SeleniumBase
|
|
586
|
-
the target element.
|
|
579
|
+
selector: CSS selector or SeleniumBase-supported XPath selector.
|
|
587
580
|
|
|
588
581
|
attribute: Specific HTML attribute to retrieve. When omitted, return
|
|
589
|
-
all HTML attributes of the element as a dictionary.
|
|
582
|
+
all HTML attributes of the first matching element as a dictionary.
|
|
583
|
+
|
|
584
|
+
timeout: Maximum seconds to wait for the target element. Default: 5.
|
|
590
585
|
|
|
591
586
|
Returns:
|
|
592
|
-
The requested attribute
|
|
593
|
-
HTML attributes of the element when attribute is omitted.
|
|
587
|
+
The requested attribute(s).
|
|
594
588
|
|
|
595
589
|
Tool selection:
|
|
596
590
|
- Need one or more HTML attribute values from a specific element ->
|
|
@@ -601,13 +595,16 @@ def get_attributes(
|
|
|
601
595
|
- Need to check element presence/visibility -> use 'check_condition'.
|
|
602
596
|
|
|
603
597
|
This is a read-only operation.
|
|
598
|
+
|
|
599
|
+
If there's no matching element found within the timeout,
|
|
600
|
+
then @handle_sb_errors will return details from the exception raised.
|
|
604
601
|
"""
|
|
605
602
|
sb = _get_sb()
|
|
606
603
|
|
|
607
604
|
if attribute:
|
|
608
|
-
return sb.get_attribute(selector, attribute)
|
|
605
|
+
return sb.get_attribute(selector, attribute, timeout=timeout)
|
|
609
606
|
|
|
610
|
-
return sb.get_element_attributes(selector)
|
|
607
|
+
return sb.get_element_attributes(selector, timeout=timeout)
|
|
611
608
|
|
|
612
609
|
|
|
613
610
|
@mcp.tool()
|
|
@@ -963,6 +960,7 @@ def focus(
|
|
|
963
960
|
"focus",
|
|
964
961
|
"highlight",
|
|
965
962
|
] = "scroll_to_element",
|
|
963
|
+
timeout: float = 5,
|
|
966
964
|
) -> str:
|
|
967
965
|
"""Scroll to, focus, or highlight an element.
|
|
968
966
|
|
|
@@ -976,16 +974,22 @@ def focus(
|
|
|
976
974
|
- "scroll_to_element": Scroll the element into the viewport.
|
|
977
975
|
- "focus": Move keyboard focus to the element.
|
|
978
976
|
- "highlight": Temporarily highlight the element for debugging or
|
|
979
|
-
demonstration. May affect timing
|
|
977
|
+
demonstration by changing the border color. May affect timing
|
|
978
|
+
and/or reduce stealth.
|
|
979
|
+
|
|
980
|
+
timeout: Maximum seconds to wait for the target element. Default: 5.
|
|
981
|
+
|
|
982
|
+
If there's no matching element found within the timeout,
|
|
983
|
+
then @handle_sb_errors will return details from the exception raised.
|
|
980
984
|
"""
|
|
981
985
|
sb = _get_sb()
|
|
982
986
|
|
|
983
987
|
if action == "scroll_to_element":
|
|
984
|
-
sb.scroll_into_view(selector)
|
|
988
|
+
sb.scroll_into_view(selector, timeout=timeout)
|
|
985
989
|
elif action == "focus":
|
|
986
|
-
sb.find_element(selector).focus()
|
|
990
|
+
sb.find_element(selector, timeout=timeout).focus()
|
|
987
991
|
elif action == "highlight":
|
|
988
|
-
sb.highlight(selector)
|
|
992
|
+
sb.highlight(selector, timeout=timeout)
|
|
989
993
|
else:
|
|
990
994
|
return (
|
|
991
995
|
f"Error: unknown action '{action}'. "
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# seleniumbase package
|
|
2
|
-
__version__ = "4.54.
|
|
2
|
+
__version__ = "4.54.2"
|
|
@@ -827,7 +827,7 @@ class CDPMethods():
|
|
|
827
827
|
driver = driver.cdp_base
|
|
828
828
|
return self.loop.run_until_complete(driver.reset_permissions())
|
|
829
829
|
|
|
830
|
-
def get_all_urls(self, absolute=True, selector=None):
|
|
830
|
+
def get_all_urls(self, absolute=True, selector=None, timeout=None):
|
|
831
831
|
"""
|
|
832
832
|
Convenience function that returns all links (a,link,img,script).
|
|
833
833
|
:param absolute:
|
|
@@ -838,13 +838,15 @@ class CDPMethods():
|
|
|
838
838
|
instead of the entire page.
|
|
839
839
|
:return: List of URLs.
|
|
840
840
|
"""
|
|
841
|
+
if not timeout:
|
|
842
|
+
timeout = settings.SMALL_TIMEOUT
|
|
841
843
|
if isinstance(absolute, str) and selector is None:
|
|
842
844
|
# The `selector` is usually first, so the user may get confused.
|
|
843
845
|
# Therefore, if first arg is string, it's probably the selector.
|
|
844
846
|
selector = absolute
|
|
845
847
|
absolute = True
|
|
846
848
|
if selector:
|
|
847
|
-
html = self.find_element(selector).get_html()
|
|
849
|
+
html = self.find_element(selector, timeout=timeout).get_html()
|
|
848
850
|
soup = self.get_beautiful_soup(html)
|
|
849
851
|
page_url = self.get_current_url()
|
|
850
852
|
return page_utils._get_unique_links(page_url, soup)
|
|
@@ -1876,8 +1878,11 @@ class CDPMethods():
|
|
|
1876
1878
|
def get_flattened_document(self):
|
|
1877
1879
|
return self.loop.run_until_complete(self.page.get_flattened_document())
|
|
1878
1880
|
|
|
1879
|
-
def get_element_attributes(self, selector):
|
|
1881
|
+
def get_element_attributes(self, selector, timeout=None):
|
|
1882
|
+
if not timeout:
|
|
1883
|
+
timeout = settings.SMALL_TIMEOUT
|
|
1880
1884
|
selector = self.__convert_to_css_if_xpath(selector)
|
|
1885
|
+
self.find_element(selector, timeout=timeout)
|
|
1881
1886
|
return self.loop.run_until_complete(
|
|
1882
1887
|
self.page.js_dumps(
|
|
1883
1888
|
"""document.querySelector('%s')"""
|
|
@@ -1885,10 +1890,13 @@ class CDPMethods():
|
|
|
1885
1890
|
)
|
|
1886
1891
|
)
|
|
1887
1892
|
|
|
1888
|
-
def get_element_attribute(self, selector, attribute):
|
|
1893
|
+
def get_element_attribute(self, selector, attribute, timeout=None):
|
|
1889
1894
|
"""Find an element and return the value of an attribute.
|
|
1890
1895
|
Raises an exception if there's no such element or attribute."""
|
|
1891
|
-
|
|
1896
|
+
if not timeout:
|
|
1897
|
+
timeout = settings.SMALL_TIMEOUT
|
|
1898
|
+
selector = self.__convert_to_css_if_xpath(selector)
|
|
1899
|
+
attributes = self.get_element_attributes(selector, timeout=timeout)
|
|
1892
1900
|
with suppress(Exception):
|
|
1893
1901
|
return attributes[attribute]
|
|
1894
1902
|
locate = ' %s="' % attribute
|
|
@@ -3685,8 +3693,10 @@ class CDPMethods():
|
|
|
3685
3693
|
with suppress(Exception):
|
|
3686
3694
|
self.loop.run_until_complete(self.page.evaluate(js_code))
|
|
3687
3695
|
|
|
3688
|
-
def scroll_into_view(self, selector):
|
|
3689
|
-
|
|
3696
|
+
def scroll_into_view(self, selector, timeout=None):
|
|
3697
|
+
if not timeout:
|
|
3698
|
+
timeout = settings.SMALL_TIMEOUT
|
|
3699
|
+
self.find_element(selector, timeout=timeout).scroll_into_view()
|
|
3690
3700
|
self.loop.run_until_complete(self.page.wait(0.05))
|
|
3691
3701
|
|
|
3692
3702
|
def scroll_to_y(self, y):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: seleniumbase
|
|
3
|
-
Version: 4.54.
|
|
3
|
+
Version: 4.54.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
|
|
@@ -171,6 +171,7 @@ Dynamic: requires-python
|
|
|
171
171
|
Dynamic: summary
|
|
172
172
|
|
|
173
173
|
<!-- SeleniumBase Docs -->
|
|
174
|
+
<!-- mcp-name: io.github.seleniumbase/seleniumbase -->
|
|
174
175
|
|
|
175
176
|
<meta property="og:site_name" content="SeleniumBase">
|
|
176
177
|
<meta property="og:title" content="SeleniumBase: Stealthy Chromium Automation with Python; and E2E Testing." />
|
|
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
|
|
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
|
|
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
|
{seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/drivers/chromium_drivers/__init__.py
RENAMED
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/cdp_driver/_contradict.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/undetected/cdp_driver/connection.py
RENAMED
|
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
|
{seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/grid_hub.py
RENAMED
|
File without changes
|
{seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/grid_node.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/start-grid-hub.bat
RENAMED
|
File without changes
|
{seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_grid/start-grid-hub.sh
RENAMED
|
File without changes
|
|
File without changes
|
{seleniumbase-4.54.1 → seleniumbase-4.54.2}/seleniumbase/utilities/selenium_ide/convert_ide.py
RENAMED
|
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
|