seleniumbase 4.33.12__py3-none-any.whl → 4.33.13__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
1
  # seleniumbase package
2
- __version__ = "4.33.12"
2
+ __version__ = "4.33.13"
@@ -533,10 +533,26 @@ def uc_open_with_cdp_mode(driver, url=None):
533
533
  if url_protocol not in ["about", "data", "chrome"]:
534
534
  safe_url = False
535
535
 
536
+ headless = False
537
+ headed = None
538
+ xvfb = None
539
+ if hasattr(sb_config, "headless"):
540
+ headless = sb_config.headless
541
+ if hasattr(sb_config, "headed"):
542
+ headed = sb_config.headed
543
+ if hasattr(sb_config, "xvfb"):
544
+ xvfb = sb_config.xvfb
545
+
536
546
  loop = asyncio.new_event_loop()
537
547
  asyncio.set_event_loop(loop)
538
548
  driver.cdp_base = loop.run_until_complete(
539
- cdp_util.start(host=cdp_host, port=cdp_port)
549
+ cdp_util.start(
550
+ host=cdp_host,
551
+ port=cdp_port,
552
+ headless=headless,
553
+ headed=headed,
554
+ xvfb=xvfb,
555
+ )
540
556
  )
541
557
  loop.run_until_complete(driver.cdp_base.wait(0))
542
558
 
@@ -863,13 +879,15 @@ def __install_pyautogui_if_missing():
863
879
  xvfb_height = 768
864
880
  sb_config._xvfb_height = xvfb_height
865
881
  with suppress(Exception):
866
- xvfb_display = Display(
882
+ _xvfb_display = Display(
867
883
  visible=True,
868
884
  size=(xvfb_width, xvfb_height),
869
885
  backend="xvfb",
870
886
  use_xauth=True,
871
887
  )
872
- xvfb_display.start()
888
+ _xvfb_display.start()
889
+ sb_config._virtual_display = _xvfb_display
890
+ sb_config.headless_active = True
873
891
 
874
892
 
875
893
  def install_pyautogui_if_missing(driver):
@@ -13795,7 +13795,8 @@ class BaseCase(unittest.TestCase):
13795
13795
  if self.get_current_url() == "about:blank":
13796
13796
  self.switch_to_window(current_window)
13797
13797
  except Exception:
13798
- self.switch_to_window(current_window)
13798
+ with suppress(Exception):
13799
+ self.switch_to_window(current_window)
13799
13800
 
13800
13801
  def __needs_minimum_wait(self):
13801
13802
  if (
@@ -14004,9 +14005,10 @@ class BaseCase(unittest.TestCase):
14004
14005
  visible=0, size=(width, height)
14005
14006
  )
14006
14007
  self._xvfb_display.start()
14007
- sb_config._virtual_display = self._xvfb_display
14008
14008
  self.headless_active = True
14009
- sb_config.headless_active = True
14009
+ if not self.undetectable:
14010
+ sb_config._virtual_display = self._xvfb_display
14011
+ sb_config.headless_active = True
14010
14012
 
14011
14013
  def __activate_virtual_display(self):
14012
14014
  if self.undetectable and not (self.headless or self.headless2):
@@ -14029,6 +14031,8 @@ class BaseCase(unittest.TestCase):
14029
14031
  "\nX11 display failed! Will use regular xvfb!"
14030
14032
  )
14031
14033
  self.__activate_standard_virtual_display()
14034
+ else:
14035
+ self.headless_active = True
14032
14036
  except Exception as e:
14033
14037
  if hasattr(e, "msg"):
14034
14038
  print("\n" + str(e.msg))
@@ -16601,6 +16605,7 @@ class BaseCase(unittest.TestCase):
16601
16605
  self.__quit_all_drivers()
16602
16606
  # Resume tearDown() for all test runners, (Pytest / Pynose / Behave)
16603
16607
  if hasattr(self, "_xvfb_display") and self._xvfb_display:
16608
+ # Stop the Xvfb virtual display launched from BaseCase
16604
16609
  try:
16605
16610
  if hasattr(self._xvfb_display, "stop"):
16606
16611
  self._xvfb_display.stop()
@@ -16610,6 +16615,20 @@ class BaseCase(unittest.TestCase):
16610
16615
  pass
16611
16616
  except Exception:
16612
16617
  pass
16618
+ if (
16619
+ hasattr(sb_config, "_virtual_display")
16620
+ and sb_config._virtual_display
16621
+ and hasattr(sb_config._virtual_display, "stop")
16622
+ ):
16623
+ # CDP Mode may launch a 2nd Xvfb virtual display
16624
+ try:
16625
+ sb_config._virtual_display.stop()
16626
+ sb_config._virtual_display = None
16627
+ sb_config.headless_active = False
16628
+ except AttributeError:
16629
+ pass
16630
+ except Exception:
16631
+ pass
16613
16632
  if self.__visual_baseline_copies:
16614
16633
  sb_config._visual_baseline_copies = True
16615
16634
  if has_exception:
@@ -1256,6 +1256,19 @@ def SB(
1256
1256
  print(traceback.format_exc().strip())
1257
1257
  if test and not test_passed:
1258
1258
  print("********** ERROR: The test AND the tearDown() FAILED!")
1259
+ if (
1260
+ hasattr(sb_config, "_virtual_display")
1261
+ and sb_config._virtual_display
1262
+ and hasattr(sb_config._virtual_display, "stop")
1263
+ ):
1264
+ try:
1265
+ sb_config._virtual_display.stop()
1266
+ sb_config._virtual_display = None
1267
+ sb_config.headless_active = False
1268
+ except AttributeError:
1269
+ pass
1270
+ except Exception:
1271
+ pass
1259
1272
  end_time = time.time()
1260
1273
  run_time = end_time - start_time
1261
1274
  sb_config = sb_config_backup
@@ -84,6 +84,9 @@ def __activate_virtual_display_as_needed(
84
84
  "\nX11 display failed! Will use regular xvfb!"
85
85
  )
86
86
  __activate_standard_virtual_display()
87
+ else:
88
+ sb_config._virtual_display = _xvfb_display
89
+ sb_config.headless_active = True
87
90
  except Exception as e:
88
91
  if hasattr(e, "msg"):
89
92
  print("\n" + str(e.msg))
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2014-2024 Michael Mintz
3
+ Copyright (c) 2014-2025 Michael Mintz
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: seleniumbase
3
- Version: 4.33.12
3
+ Version: 4.33.13
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
@@ -62,7 +62,7 @@ License-File: LICENSE
62
62
  Requires-Dist: pip>=24.3.1
63
63
  Requires-Dist: packaging>=24.2
64
64
  Requires-Dist: setuptools~=70.2; python_version < "3.10"
65
- Requires-Dist: setuptools>=75.6.0; python_version >= "3.10"
65
+ Requires-Dist: setuptools>=75.8.0; python_version >= "3.10"
66
66
  Requires-Dist: wheel>=0.45.1
67
67
  Requires-Dist: attrs>=24.3.0
68
68
  Requires-Dist: certifi>=2024.12.14
@@ -84,7 +84,7 @@ Requires-Dist: parse>=1.20.2
84
84
  Requires-Dist: parse-type>=0.6.4
85
85
  Requires-Dist: colorama>=0.4.6
86
86
  Requires-Dist: pyyaml>=6.0.2
87
- Requires-Dist: pygments>=2.18.0
87
+ Requires-Dist: pygments>=2.19.1
88
88
  Requires-Dist: pyreadline3>=3.5.3; platform_system == "Windows"
89
89
  Requires-Dist: tabcompleter>=1.4.0
90
90
  Requires-Dist: pdbp>=1.6.1
@@ -97,7 +97,8 @@ Requires-Dist: requests==2.32.3
97
97
  Requires-Dist: sniffio==1.3.1
98
98
  Requires-Dist: h11==0.14.0
99
99
  Requires-Dist: outcome==1.3.0.post0
100
- Requires-Dist: trio==0.27.0
100
+ Requires-Dist: trio==0.27.0; python_version < "3.9"
101
+ Requires-Dist: trio==0.28.0; python_version >= "3.9"
101
102
  Requires-Dist: trio-websocket==0.11.1
102
103
  Requires-Dist: wsproto==1.2.0
103
104
  Requires-Dist: websocket-client==1.8.0
@@ -129,7 +130,7 @@ Requires-Dist: allure-python-commons>=2.13.5; extra == "allure"
129
130
  Requires-Dist: allure-behave>=2.13.5; extra == "allure"
130
131
  Provides-Extra: coverage
131
132
  Requires-Dist: coverage>=7.6.1; python_version < "3.9" and extra == "coverage"
132
- Requires-Dist: coverage>=7.6.9; python_version >= "3.9" and extra == "coverage"
133
+ Requires-Dist: coverage>=7.6.10; python_version >= "3.9" and extra == "coverage"
133
134
  Requires-Dist: pytest-cov>=5.0.0; python_version < "3.9" and extra == "coverage"
134
135
  Requires-Dist: pytest-cov>=6.0.0; python_version >= "3.9" and extra == "coverage"
135
136
  Provides-Extra: flake8
@@ -153,7 +154,7 @@ Requires-Dist: cffi==1.17.1; extra == "pdfminer"
153
154
  Requires-Dist: pycparser==2.22; extra == "pdfminer"
154
155
  Provides-Extra: pillow
155
156
  Requires-Dist: Pillow>=10.4.0; python_version < "3.9" and extra == "pillow"
156
- Requires-Dist: Pillow>=11.0.0; python_version >= "3.9" and extra == "pillow"
157
+ Requires-Dist: Pillow>=11.1.0; python_version >= "3.9" and extra == "pillow"
157
158
  Provides-Extra: pip-system-certs
158
159
  Requires-Dist: pip-system-certs==4.0; platform_system == "Windows" and extra == "pip-system-certs"
159
160
  Provides-Extra: proxy
@@ -176,6 +177,18 @@ Requires-Dist: hyperframe==6.0.1; extra == "selenium-wire"
176
177
  Requires-Dist: kaitaistruct==0.10; extra == "selenium-wire"
177
178
  Requires-Dist: pyasn1==0.6.1; extra == "selenium-wire"
178
179
  Requires-Dist: zstandard==0.23.0; extra == "selenium-wire"
180
+ Dynamic: author
181
+ Dynamic: author-email
182
+ Dynamic: classifier
183
+ Dynamic: home-page
184
+ Dynamic: keywords
185
+ Dynamic: license
186
+ Dynamic: maintainer
187
+ Dynamic: platform
188
+ Dynamic: provides-extra
189
+ Dynamic: requires-dist
190
+ Dynamic: requires-python
191
+ Dynamic: summary
179
192
 
180
193
  <!-- SeleniumBase Docs -->
181
194
 
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
3
3
  sbase/steps.py,sha256=_WvAjydKqZfTdnZW9LPKkRty-g-lfdUPmLqnZj6ulcs,43013
4
4
  seleniumbase/__init__.py,sha256=OtJh8nGKL4xtZpw8KPqmn7Q6R-86t4cWUDyVF5MbMTo,2398
5
5
  seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
6
- seleniumbase/__version__.py,sha256=0OZXpruceiqE15CL_lL99PZVeEgaBkTbwpFG6D-9WT4,47
6
+ seleniumbase/__version__.py,sha256=fdIgU6XLjQLyRj6V05cYPC9_n4yf9X6eAsNFamcuZgo,47
7
7
  seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  seleniumbase/behave/behave_helper.py,sha256=elkl8P9eLulRAioLstE9baYNM9N_PHBmAOcajX-pH_Y,24198
9
9
  seleniumbase/behave/behave_sb.py,sha256=-hza7Nx2U41mSObYiPMi48v3JlPh3sJO3yzP0kqZ1Gk,59174
@@ -36,7 +36,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=tNy-bMDgwHJO3bZxMpmo9weSE8uhbH0C
36
36
  seleniumbase/console_scripts/sb_recorder.py,sha256=fnHb5-kh11Hit-E9Ha-e4QXzqLcZvtij6mb5qNd4B1Q,11032
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=nQ8-5dvNU4Uy5lSTgnwB2nFAemS43PqJhHccdvdGJ94,224486
39
+ seleniumbase/core/browser_launcher.py,sha256=RqsyaqqFvQ-L9LcVXS8Yr5s9abykUEF5_72RO6cYUqs,224989
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
@@ -65,7 +65,7 @@ seleniumbase/extensions/disable_csp.zip,sha256=YMifIIgEBiLrEFrS1sfW4Exh4br1V4oK1
65
65
  seleniumbase/extensions/recorder.zip,sha256=OOyzF-Ize2cSRu1CqhzSAq5vusI9hqLLd2OIApUHesI,11918
66
66
  seleniumbase/extensions/sbase_ext.zip,sha256=3s1N8zrVaMz8RQEOIoBzC3KDjtmHwVZRvVsX25Odr_s,8175
67
67
  seleniumbase/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
- seleniumbase/fixtures/base_case.py,sha256=xwRyaBUd7jpN_RQvTXabrMVMBUnuG65Bp8KDDrcoWYk,719184
68
+ seleniumbase/fixtures/base_case.py,sha256=IfOwY0b31ngawTZY0thwHvcRGOSCUd647sm_iGKIMk0,719922
69
69
  seleniumbase/fixtures/constants.py,sha256=e1LppavlrAcI4XBJMq7u5j8SffaQ7SPQps1y0YvZYfY,13649
70
70
  seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
71
71
  seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
@@ -90,7 +90,7 @@ seleniumbase/plugins/driver_manager.py,sha256=s20s0pJYaNrG0WNwyIC04oUMRVFjtm6V_n
90
90
  seleniumbase/plugins/page_source.py,sha256=loTnXxOj4kxEukuTZEiGyvKBhY3KDVDMnNlHHheTBDE,1889
91
91
  seleniumbase/plugins/pytest_plugin.py,sha256=JjpglUqHkfl6rzdg1SkJ7PMtNRpceOgLNbUi2DyKpJI,105416
92
92
  seleniumbase/plugins/s3_logging_plugin.py,sha256=WDfertQgGOW_SRJpFMaekYD6vBVW9VO62POtXXy2HCM,2319
93
- seleniumbase/plugins/sb_manager.py,sha256=qCf6RAkAfziLTGgiJvB3V416RxWoTbRLm9wc-KsB8g8,54419
93
+ seleniumbase/plugins/sb_manager.py,sha256=Z19CfRSaqcxdn_YvzXVt4B9Nu3Bhs97QIO5tHlvbuyk,54871
94
94
  seleniumbase/plugins/screen_shots.py,sha256=1hrXw-hzuZ1BR6Yh7AyWX2ABnvnP73-RCbwdz958gj4,1127
95
95
  seleniumbase/plugins/selenium_plugin.py,sha256=GhGW2ATy2kM7UH7NrZ2je402nN2LMlVHpM-yxlU3I9E,59069
96
96
  seleniumbase/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -116,7 +116,7 @@ seleniumbase/undetected/webelement.py,sha256=_s6evgUkdWJpwOnzX4qR9i796PoVbz3txlz
116
116
  seleniumbase/undetected/cdp_driver/__init__.py,sha256=c0TjMwPfVFyoqYOJ7PQ-Jln_L_dpN3ebHyaD-juQoM0,64
117
117
  seleniumbase/undetected/cdp_driver/_contradict.py,sha256=lP4b0h5quAy573ETn_TBbYV889cL1AuPLVInpJ0ZkiU,3183
118
118
  seleniumbase/undetected/cdp_driver/browser.py,sha256=quD0e2aoehXQrs9zxGsobF0kZY11gmJ58Q_JQhheQYg,30144
119
- seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=YhtD2Tm6PLIy9VKbgk8lHdGniS3mObyX4yAC1aG0TgQ,16733
119
+ seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=X7bd5qt-kegTiOEcsoLUHrAJ5YTruEub-9oL4TBDTYk,16886
120
120
  seleniumbase/undetected/cdp_driver/config.py,sha256=oHFJ3UH0OmLmEGgG5S6SZwbyBs9ZYMsbUJ02QCA7iZc,12044
121
121
  seleniumbase/undetected/cdp_driver/connection.py,sha256=sOTUGjbUqKA2hPvDcRCdqw1VQjVGJs7mbgVvzS7ldtE,23360
122
122
  seleniumbase/undetected/cdp_driver/element.py,sha256=FIC6v7OmumLCT-_vIc3H4oju_oBbaLpWJUJIKm2c_q4,40467
@@ -135,9 +135,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.bat,sha256=Ftq-GrAKRYH2ssDPr
135
135
  seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443QFK8PryBpDmKn5Gy0s4o0vDSM,106
136
136
  seleniumbase/utilities/selenium_ide/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
137
137
  seleniumbase/utilities/selenium_ide/convert_ide.py,sha256=pZFnqEJQEKZPyNFjkLD29s2HPQgCrWW9XJWpCPhWOoM,31691
138
- seleniumbase-4.33.12.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
139
- seleniumbase-4.33.12.dist-info/METADATA,sha256=6bDBhrptfHbhYpEAgxncG9BFuROdyma7C_CB3UXd8ao,86044
140
- seleniumbase-4.33.12.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
141
- seleniumbase-4.33.12.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
142
- seleniumbase-4.33.12.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
143
- seleniumbase-4.33.12.dist-info/RECORD,,
138
+ seleniumbase-4.33.13.dist-info/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
139
+ seleniumbase-4.33.13.dist-info/METADATA,sha256=bMOMidFBkEka4HeTU6dLn4Vj1JPxenoqxYyRZ66Q8y4,86361
140
+ seleniumbase-4.33.13.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
141
+ seleniumbase-4.33.13.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
142
+ seleniumbase-4.33.13.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
143
+ seleniumbase-4.33.13.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5