seleniumbase 4.44.3__py3-none-any.whl → 4.44.4__py3-none-any.whl

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.
@@ -1,2 +1,2 @@
1
1
  # seleniumbase package
2
- __version__ = "4.44.3"
2
+ __version__ = "4.44.4"
@@ -295,14 +295,14 @@ def extend_driver(
295
295
  driver.set_wire_proxy = DM.set_wire_proxy
296
296
  completed_loads = []
297
297
  for ext_dir in sb_config._ext_dirs:
298
- with suppress(Exception):
299
- if ext_dir not in completed_loads:
300
- completed_loads.append(ext_dir)
301
- if not use_uc and os.path.exists(os.path.abspath(ext_dir)):
302
- driver.webextension.install(os.path.abspath(ext_dir))
298
+ if ext_dir not in completed_loads:
299
+ completed_loads.append(ext_dir)
300
+ if not use_uc and os.path.exists(os.path.realpath(ext_dir)):
301
+ with suppress(Exception):
302
+ driver.webextension.install(os.path.realpath(ext_dir))
303
303
  if proxy_auth:
304
- with suppress(Exception):
305
- if not use_uc and os.path.exists(proxy_helper.PROXY_DIR_PATH):
304
+ if not use_uc and os.path.exists(proxy_helper.PROXY_DIR_PATH):
305
+ with suppress(Exception):
306
306
  driver.webextension.install(proxy_helper.PROXY_DIR_PATH)
307
307
  # Proxy needs a moment to load in Manifest V3
308
308
  if use_uc:
@@ -838,6 +838,7 @@ def uc_open_with_cdp_mode(driver, url=None, **kwargs):
838
838
  cdp.get_element_position = CDPM.get_element_position
839
839
  cdp.get_gui_element_rect = CDPM.get_gui_element_rect
840
840
  cdp.get_gui_element_center = CDPM.get_gui_element_center
841
+ cdp.get_html = CDPM.get_html
841
842
  cdp.get_page_source = CDPM.get_page_source
842
843
  cdp.get_user_agent = CDPM.get_user_agent
843
844
  cdp.get_cookie_string = CDPM.get_cookie_string
@@ -934,6 +935,7 @@ def uc_open_with_cdp_mode(driver, url=None, **kwargs):
934
935
  cdp.core = core_items
935
936
  cdp.loop = cdp.get_event_loop()
936
937
  driver.cdp = cdp
938
+ driver.solve_captcha = CDPM.solve_captcha
937
939
  driver._is_using_cdp = True
938
940
 
939
941
 
@@ -2477,7 +2479,7 @@ def _set_chrome_options(
2477
2479
  # Can be a comma-separated list of .ZIP or .CRX files
2478
2480
  extension_zip_list = extension_zip.split(",")
2479
2481
  for extension_zip_item in extension_zip_list:
2480
- abs_path = os.path.abspath(extension_zip_item)
2482
+ abs_path = os.path.realpath(extension_zip_item)
2481
2483
  if os.path.exists(abs_path):
2482
2484
  try:
2483
2485
  abs_path_dir = os.path.join(
@@ -2494,11 +2496,11 @@ def _set_chrome_options(
2494
2496
  if extension_dir:
2495
2497
  # load-extension input can be a comma-separated list
2496
2498
  abs_path = (
2497
- ",".join(os.path.abspath(p) for p in extension_dir.split(","))
2499
+ ",".join(os.path.realpath(p) for p in extension_dir.split(","))
2498
2500
  )
2499
2501
  chrome_options = add_chrome_ext_dir(chrome_options, abs_path)
2500
2502
  for p in extension_dir.split(","):
2501
- sb_config._ext_dirs.append(os.path.abspath(p))
2503
+ sb_config._ext_dirs.append(os.path.realpath(p))
2502
2504
  if (
2503
2505
  page_load_strategy
2504
2506
  and page_load_strategy.lower() in ["eager", "none"]
@@ -2742,10 +2744,12 @@ def _set_chrome_options(
2742
2744
  included_disabled_features.append(item)
2743
2745
  d_f_string = ",".join(included_disabled_features)
2744
2746
  chrome_options.add_argument("--disable-features=%s" % d_f_string)
2747
+ chrome_options.add_argument("--enable-unsafe-extension-debugging")
2745
2748
  if proxy_auth:
2746
2749
  chrome_options.add_argument("--test-type")
2747
2750
  if proxy_auth or sb_config._ext_dirs:
2748
2751
  if not is_using_uc(undetectable, browser_name):
2752
+ chrome_options.add_argument("--remote-debugging-pipe")
2749
2753
  chrome_options.enable_webextensions = True
2750
2754
  chrome_options.enable_bidi = True
2751
2755
  if (
@@ -4577,12 +4581,12 @@ def get_local_driver(
4577
4581
  # Can be a comma-separated list of .ZIP or .CRX files
4578
4582
  extension_zip_list = extension_zip.split(",")
4579
4583
  for extension_zip_item in extension_zip_list:
4580
- abs_path = os.path.abspath(extension_zip_item)
4584
+ abs_path = os.path.realpath(extension_zip_item)
4581
4585
  edge_options.add_extension(abs_path)
4582
4586
  if extension_dir:
4583
4587
  # load-extension input can be a comma-separated list
4584
4588
  abs_path = (
4585
- ",".join(os.path.abspath(p) for p in extension_dir.split(","))
4589
+ ",".join(os.path.realpath(p) for p in extension_dir.split(","))
4586
4590
  )
4587
4591
  edge_options = add_chrome_ext_dir(edge_options, abs_path)
4588
4592
  edge_options.add_argument("--disable-infobars")
@@ -1185,7 +1185,14 @@ class CDPMethods():
1185
1185
  self.page.evaluate("window.location.origin")
1186
1186
  )
1187
1187
 
1188
- def get_page_source(self):
1188
+ def get_html(self, include_shadow_dom=True):
1189
+ return self.get_page_source(
1190
+ include_shadow_dom=include_shadow_dom
1191
+ )
1192
+
1193
+ def get_page_source(self, include_shadow_dom=True):
1194
+ if include_shadow_dom:
1195
+ return self.find_element("html").get_html()
1189
1196
  try:
1190
1197
  source = self.loop.run_until_complete(
1191
1198
  self.page.evaluate("document.documentElement.outerHTML")
@@ -1293,8 +1293,11 @@ class BaseCase(unittest.TestCase):
1293
1293
  self.__check_scope()
1294
1294
  return self.execute_script("return window.location.origin;")
1295
1295
 
1296
- def get_page_source(self):
1297
- if self.__is_cdp_swap_needed():
1296
+ def get_html(self, *args, **kwargs):
1297
+ return self.get_page_source(*args, **kwargs)
1298
+
1299
+ def get_page_source(self, *args, **kwargs):
1300
+ if self.__is_cdp_swap_needed(*args, **kwargs):
1298
1301
  return self.cdp.get_page_source()
1299
1302
  self.wait_for_ready_state_complete()
1300
1303
  if self.__needs_minimum_wait:
@@ -130,6 +130,7 @@ class Config:
130
130
  "--no-default-browser-check",
131
131
  "--homepage=about:blank",
132
132
  "--no-pings",
133
+ "--enable-unsafe-extension-debugging",
133
134
  "--wm-window-animations-disabled",
134
135
  "--animation-duration-scale=0",
135
136
  "--enable-privacy-sandbox-ads-apis",
@@ -806,7 +806,10 @@ class Element:
806
806
 
807
807
  async def get_html_async(self):
808
808
  return await self._tab.send(
809
- cdp.dom.get_outer_html(backend_node_id=self.backend_node_id)
809
+ cdp.dom.get_outer_html(
810
+ backend_node_id=self.backend_node_id,
811
+ include_shadow_dom=True,
812
+ )
810
813
  )
811
814
 
812
815
  @property
@@ -899,7 +899,10 @@ class Tab(Connection):
899
899
  """Gets the current page source content (html)"""
900
900
  doc: cdp.dom.Node = await self.send(cdp.dom.get_document(-1, True))
901
901
  return await self.send(
902
- cdp.dom.get_outer_html(backend_node_id=doc.backend_node_id)
902
+ cdp.dom.get_outer_html(
903
+ backend_node_id=doc.backend_node_id,
904
+ include_shadow_dom=True,
905
+ )
903
906
  )
904
907
 
905
908
  async def maximize(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seleniumbase
3
- Version: 4.44.3
3
+ Version: 4.44.4
4
4
  Summary: A complete web automation framework for end-to-end testing.
5
5
  Home-page: https://github.com/seleniumbase/SeleniumBase
6
6
  Author: Michael Mintz
@@ -75,7 +75,7 @@ Requires-Dist: filelock~=3.16.1; python_version < "3.9"
75
75
  Requires-Dist: filelock~=3.19.1; python_version >= "3.9" and python_version < "3.10"
76
76
  Requires-Dist: filelock>=3.20.0; python_version >= "3.10"
77
77
  Requires-Dist: fasteners>=0.20
78
- Requires-Dist: mycdp>=1.2.1
78
+ Requires-Dist: mycdp>=1.3.0
79
79
  Requires-Dist: pynose>=1.5.5
80
80
  Requires-Dist: platformdirs~=4.3.6; python_version < "3.9"
81
81
  Requires-Dist: platformdirs~=4.4.0; python_version >= "3.9" and python_version < "3.10"
@@ -106,7 +106,8 @@ Requires-Dist: sniffio==1.3.1
106
106
  Requires-Dist: h11==0.16.0
107
107
  Requires-Dist: outcome==1.3.0.post0
108
108
  Requires-Dist: trio==0.27.0; python_version < "3.9"
109
- Requires-Dist: trio<1,>=0.31.0; python_version >= "3.9"
109
+ Requires-Dist: trio<1,>=0.31.0; python_version >= "3.9" and python_version < "3.10"
110
+ Requires-Dist: trio<1,>=0.32.0; python_version >= "3.10"
110
111
  Requires-Dist: trio-websocket~=0.12.2
111
112
  Requires-Dist: wsproto==1.2.0
112
113
  Requires-Dist: websocket-client~=1.8.0; python_version < "3.9"
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
3
3
  sbase/steps.py,sha256=wiPSWZhFpBlWvkqXRJ18btpBu3nQaw9K5AzIJNAX5RM,43521
4
4
  seleniumbase/__init__.py,sha256=JFEY9P5QJqsa1M6ghzLMH2eIPQyh85iglCaQwg8Y8z4,2498
5
5
  seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
6
- seleniumbase/__version__.py,sha256=zSBgnD-F9rnTALAmYbr7raHyqdo2jfQ0LDqc0vGBjQQ,46
6
+ seleniumbase/__version__.py,sha256=UIp0gYCeBm1CYce2imNjkVyZlocxEXIUpM91yU-ep6I,46
7
7
  seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  seleniumbase/behave/behave_helper.py,sha256=lJtagtivSbEpbRj0EKV4l4PuPU6NANONJJAnYwgVCe0,24379
9
9
  seleniumbase/behave/behave_sb.py,sha256=dEj9UUHVz3ejzEX25frViPQfp7acjI-UssWJO_wpugg,59875
@@ -36,7 +36,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=iUKR71Y82NhuKBKw31PJilDw-pPUr-vq
36
36
  seleniumbase/console_scripts/sb_recorder.py,sha256=DH-n2fN7N9qyHMl7wjtn8MiliBgfw-1kwgmfg1GUuhk,10772
37
37
  seleniumbase/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  seleniumbase/core/application_manager.py,sha256=e_0sjtI8cjY5BNyZj1QBR0j6_oCScxGmSXYEpcYwuZE,576
39
- seleniumbase/core/browser_launcher.py,sha256=CX9ZztrmXyTh_dzc_lbhDpCz6weKme_yOHYEVud6g6U,256777
39
+ seleniumbase/core/browser_launcher.py,sha256=xY4CsDZP_Zdkzy6OfMVu_9blmRfw5uSYEQHzASC3qbo,256997
40
40
  seleniumbase/core/capabilities_parser.py,sha256=meIS2uHapTCq2ldfNAToC7r0cKmZDRXuYNKExM1GHDY,6038
41
41
  seleniumbase/core/colored_traceback.py,sha256=DrRWfg7XEnKcgY59Xj7Jdk09H-XqHYBSUpB-DiZt6iY,2020
42
42
  seleniumbase/core/create_db_tables.sql,sha256=VWPtrdiW_HQ6yETHjqTu-VIrTwvd8I8o1NfBeaVSHpU,972
@@ -50,7 +50,7 @@ seleniumbase/core/proxy_helper.py,sha256=pZ1NboNfziHU3vWZLOZLX-qkfM3oKSnpc3omQf9
50
50
  seleniumbase/core/recorder_helper.py,sha256=gDION28OK4NAYsE-7ohKZ9Z3sxQQ0FEjf859LDpqsg4,25320
51
51
  seleniumbase/core/report_helper.py,sha256=Obg5wHltEmM6uFCWFeR8_fjeT0GzHjGgoqQIr_HUxxk,12223
52
52
  seleniumbase/core/s3_manager.py,sha256=z_4qx2jI_gtK5r3niGXgEOBpfMUicUCOciowai50MP4,3529
53
- seleniumbase/core/sb_cdp.py,sha256=2qiUvRPTCqepjr2CxAZ0s_hQEHTirQ49DHkCra7BADY,113519
53
+ seleniumbase/core/sb_cdp.py,sha256=EAr9WfkTD71EkGB9B-v8y_BdB6QwTubdGps54Qd-Rgo,113778
54
54
  seleniumbase/core/sb_driver.py,sha256=-IQsskc7HpXQbcBL04IPjmGpyYchyo7v9OPF2WcahDw,14159
55
55
  seleniumbase/core/session_helper.py,sha256=s9zD3PVZEWVzG2h81cCUskbNWLfdjC_LwwQjKptHCak,558
56
56
  seleniumbase/core/settings_parser.py,sha256=gqVohHVlE_5L5Cqe2L24uYrRzvoK-saX8E_Df7_-_3I,7609
@@ -71,7 +71,7 @@ seleniumbase/extensions/disable_csp.zip,sha256=5RvomXnm2PdivUVcxTV6jfvD8WhTEsQYH
71
71
  seleniumbase/extensions/recorder.zip,sha256=JEE_FVEvlS63cFQbVLEroIyPSS91nWCDL0MhjVrmIpk,11813
72
72
  seleniumbase/extensions/sbase_ext.zip,sha256=3s1N8zrVaMz8RQEOIoBzC3KDjtmHwVZRvVsX25Odr_s,8175
73
73
  seleniumbase/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- seleniumbase/fixtures/base_case.py,sha256=3mno3JFUKZBMWgLfhBp1p51zZWwZq05UkeSX6Ynm8Fw,743352
74
+ seleniumbase/fixtures/base_case.py,sha256=3BP6TdZPvrXmfzDG1be3-THJuds78cPGqeghcLGnIK0,743479
75
75
  seleniumbase/fixtures/constants.py,sha256=xDcfW_O7TCfiojm_oxhNGY11mSEfR-ckvbppfARPWQU,14281
76
76
  seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
77
77
  seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
@@ -123,10 +123,10 @@ seleniumbase/undetected/cdp_driver/__init__.py,sha256=Ga9alwuaZZy4_XOShc0HjgFnNq
123
123
  seleniumbase/undetected/cdp_driver/_contradict.py,sha256=lP4b0h5quAy573ETn_TBbYV889cL1AuPLVInpJ0ZkiU,3183
124
124
  seleniumbase/undetected/cdp_driver/browser.py,sha256=xTQL9IoPxoPbFWxSQ4EPXUFZQA1OiQ7x1zDP6yqyV0g,35605
125
125
  seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=wSgXxukwP4_-kVai0z1s1uoXYDiDab0jdBLa1HyW0nQ,34939
126
- seleniumbase/undetected/cdp_driver/config.py,sha256=a8t9FHTTfSh-acghYYM9hua6C_nhmQbFMROm7kNkinY,13889
126
+ seleniumbase/undetected/cdp_driver/config.py,sha256=WSGeRKhUJw6toHEdcdakEq_QEGSL7dq-gjnD2lM1twk,13941
127
127
  seleniumbase/undetected/cdp_driver/connection.py,sha256=nz_xGctJe-VG5udn6tucWZMxAo6QtuYBfL3pVAt-7Ck,25680
128
- seleniumbase/undetected/cdp_driver/element.py,sha256=DdIcD13zjvM2bgDkYoKzDhWR91LoAiZ412q12x_AOZ4,42407
129
- seleniumbase/undetected/cdp_driver/tab.py,sha256=t7Ucn0pmm7imwdCM-5KmIJNU2MCeMuIl6G3T2VMrbxU,53170
128
+ seleniumbase/undetected/cdp_driver/element.py,sha256=LWEOFHpGPbaHhrEvXtwQI1IF_tU64Duk0HrYggiFaR8,42482
129
+ seleniumbase/undetected/cdp_driver/tab.py,sha256=TiwGEfHT5k1yuzM4jZplQgDOe-YVB3lKX0fsYBppZ5E,53245
130
130
  seleniumbase/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
131
131
  seleniumbase/utilities/selenium_grid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
132
132
  seleniumbase/utilities/selenium_grid/download_selenium_server.py,sha256=RO9Mcvcrw8dyytAc9A_BcEENbv1yoJlpsKLqUyB5iLw,1732
@@ -141,9 +141,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.bat,sha256=Ftq-GrAKRYH2ssDPr
141
141
  seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443QFK8PryBpDmKn5Gy0s4o0vDSM,106
142
142
  seleniumbase/utilities/selenium_ide/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
143
143
  seleniumbase/utilities/selenium_ide/convert_ide.py,sha256=2tayFP_R9HGH0Xx6qYlPmArN0THntO6R0Wjo0qqgCZY,31680
144
- seleniumbase-4.44.3.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
145
- seleniumbase-4.44.3.dist-info/METADATA,sha256=vI7yBxqypo6ZLfOv2f6IfmrudLXzmvXcChaL_0vaUKg,90492
146
- seleniumbase-4.44.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
147
- seleniumbase-4.44.3.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
148
- seleniumbase-4.44.3.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
149
- seleniumbase-4.44.3.dist-info/RECORD,,
144
+ seleniumbase-4.44.4.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
145
+ seleniumbase-4.44.4.dist-info/METADATA,sha256=esY-JFejfR6anDOTitPx9CDMtSjBSQr5HlJY_nKNPok,90577
146
+ seleniumbase-4.44.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
147
+ seleniumbase-4.44.4.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
148
+ seleniumbase-4.44.4.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
149
+ seleniumbase-4.44.4.dist-info/RECORD,,