seleniumbase 4.41.3__py3-none-any.whl → 4.41.5__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.41.3"
2
+ __version__ = "4.41.5"
@@ -808,6 +808,8 @@ def uc_open_with_cdp_mode(driver, url=None, **kwargs):
808
808
  cdp.get_window_size = CDPM.get_window_size
809
809
  cdp.nested_click = CDPM.nested_click
810
810
  cdp.select_option_by_text = CDPM.select_option_by_text
811
+ cdp.select_option_by_index = CDPM.select_option_by_index
812
+ cdp.select_option_by_value = CDPM.select_option_by_value
811
813
  cdp.flash = CDPM.flash
812
814
  cdp.highlight = CDPM.highlight
813
815
  cdp.focus = CDPM.focus
@@ -823,6 +823,37 @@ class CDPMethods():
823
823
  % (dropdown_selector, option)
824
824
  )
825
825
 
826
+ def select_option_by_index(self, dropdown_selector, option):
827
+ element = self.find_element(dropdown_selector)
828
+ element.scroll_into_view()
829
+ options = element.query_selector_all("option")
830
+ count = 0
831
+ for found_option in options:
832
+ if count == int(option):
833
+ found_option.select_option()
834
+ return
835
+ count += 1
836
+ raise Exception(
837
+ "Unable to find index option {%s} in dropdown {%s}!"
838
+ % (dropdown_selector, option)
839
+ )
840
+
841
+ def select_option_by_value(self, dropdown_selector, option):
842
+ element = self.find_element(dropdown_selector)
843
+ element.scroll_into_view()
844
+ options = element.query_selector_all("option")
845
+ for found_option in options:
846
+ if (
847
+ "value" in found_option.attrs
848
+ and str(found_option.attrs["value"]) == str(option)
849
+ ):
850
+ found_option.select_option()
851
+ return
852
+ raise Exception(
853
+ "Unable to find value option {%s} in dropdown {%s}!"
854
+ % (dropdown_selector, option)
855
+ )
856
+
826
857
  def flash(
827
858
  self,
828
859
  selector, # The CSS Selector to flash
@@ -3198,6 +3198,9 @@ class BaseCase(unittest.TestCase):
3198
3198
  timeout = settings.SMALL_TIMEOUT
3199
3199
  if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
3200
3200
  timeout = self.__get_new_timeout(timeout)
3201
+ if self.__is_cdp_swap_needed():
3202
+ self.cdp.select_option_by_index(dropdown_selector, option)
3203
+ return
3201
3204
  self.__select_option(
3202
3205
  dropdown_selector,
3203
3206
  option,
@@ -3222,6 +3225,9 @@ class BaseCase(unittest.TestCase):
3222
3225
  timeout = settings.SMALL_TIMEOUT
3223
3226
  if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
3224
3227
  timeout = self.__get_new_timeout(timeout)
3228
+ if self.__is_cdp_swap_needed():
3229
+ self.cdp.select_option_by_value(dropdown_selector, option)
3230
+ return
3225
3231
  self.__select_option(
3226
3232
  dropdown_selector,
3227
3233
  option,
@@ -2506,8 +2506,13 @@ def pytest_unconfigure(config):
2506
2506
  reporter = config.pluginmanager.get_plugin("terminalreporter")
2507
2507
  if (
2508
2508
  not hasattr(reporter, "_sessionstarttime")
2509
- and not hasattr(reporter, "_session_start")
2510
- and not hasattr(reporter._session_start, "time")
2509
+ and (
2510
+ not hasattr(reporter, "_session_start")
2511
+ or (
2512
+ hasattr(reporter, "_session_start")
2513
+ and not hasattr(reporter._session_start, "time")
2514
+ )
2515
+ )
2511
2516
  ):
2512
2517
  return
2513
2518
  if hasattr(sb_config, "_multithreaded") and sb_config._multithreaded:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seleniumbase
3
- Version: 4.41.3
3
+ Version: 4.41.5
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
@@ -118,12 +118,12 @@ Requires-Dist: iniconfig==2.1.0
118
118
  Requires-Dist: pluggy==1.5.0; python_version < "3.9"
119
119
  Requires-Dist: pluggy==1.6.0; python_version >= "3.9"
120
120
  Requires-Dist: pytest==8.3.5; python_version < "3.9"
121
- Requires-Dist: pytest==8.4.1; python_version >= "3.9"
121
+ Requires-Dist: pytest==8.4.2; python_version >= "3.9"
122
122
  Requires-Dist: pytest-html==4.0.2
123
123
  Requires-Dist: pytest-metadata==3.1.1
124
124
  Requires-Dist: pytest-ordering==0.6
125
125
  Requires-Dist: pytest-rerunfailures==14.0; python_version < "3.9"
126
- Requires-Dist: pytest-rerunfailures==15.1; python_version >= "3.9"
126
+ Requires-Dist: pytest-rerunfailures==16.0.1; python_version >= "3.9"
127
127
  Requires-Dist: pytest-xdist==3.6.1; python_version < "3.9"
128
128
  Requires-Dist: pytest-xdist==3.8.0; python_version >= "3.9"
129
129
  Requires-Dist: parameterized==0.9.0
@@ -143,9 +143,9 @@ Requires-Dist: allure-python-commons>=2.13.5; extra == "allure"
143
143
  Requires-Dist: allure-behave>=2.13.5; extra == "allure"
144
144
  Provides-Extra: coverage
145
145
  Requires-Dist: coverage>=7.6.1; python_version < "3.9" and extra == "coverage"
146
- Requires-Dist: coverage>=7.10.5; python_version >= "3.9" and extra == "coverage"
146
+ Requires-Dist: coverage>=7.10.6; python_version >= "3.9" and extra == "coverage"
147
147
  Requires-Dist: pytest-cov>=5.0.0; python_version < "3.9" and extra == "coverage"
148
- Requires-Dist: pytest-cov>=6.2.1; python_version >= "3.9" and extra == "coverage"
148
+ Requires-Dist: pytest-cov>=6.3.0; python_version >= "3.9" and extra == "coverage"
149
149
  Provides-Extra: flake8
150
150
  Requires-Dist: flake8==5.0.4; python_version < "3.9" and extra == "flake8"
151
151
  Requires-Dist: flake8==7.3.0; python_version >= "3.9" and extra == "flake8"
@@ -164,7 +164,7 @@ Provides-Extra: pdfminer
164
164
  Requires-Dist: pdfminer.six==20250324; python_version < "3.9" and extra == "pdfminer"
165
165
  Requires-Dist: pdfminer.six==20250506; python_version >= "3.9" and extra == "pdfminer"
166
166
  Requires-Dist: cryptography==39.0.2; python_version < "3.9" and extra == "pdfminer"
167
- Requires-Dist: cryptography==45.0.6; python_version >= "3.9" and extra == "pdfminer"
167
+ Requires-Dist: cryptography==45.0.7; python_version >= "3.9" and extra == "pdfminer"
168
168
  Requires-Dist: cffi==1.17.1; extra == "pdfminer"
169
169
  Requires-Dist: pycparser==2.22; extra == "pdfminer"
170
170
  Provides-Extra: pillow
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
3
3
  sbase/steps.py,sha256=EdJyNVJ1yxoHsc7qp8kzx0EESIkOh_033yLCvmaPcs4,43281
4
4
  seleniumbase/__init__.py,sha256=JFEY9P5QJqsa1M6ghzLMH2eIPQyh85iglCaQwg8Y8z4,2498
5
5
  seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
6
- seleniumbase/__version__.py,sha256=33QQxeiCJzToF77JtyOR29kdfFS__rlg8PAf8rlqs9M,46
6
+ seleniumbase/__version__.py,sha256=l-u1FihIlcZaNA1NMv0yTZ7UM2dRmCgnZyU-dE86iEY,46
7
7
  seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  seleniumbase/behave/behave_helper.py,sha256=f4CdiSSYM3gMAicSKWJInkVGFwpGXtHMD8fikTehopQ,24291
9
9
  seleniumbase/behave/behave_sb.py,sha256=guLihFsr1uJ4v2AR3r3Vy_BTeHrHwy2JEJxhp-MVnZA,59872
@@ -36,7 +36,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=tNy-bMDgwHJO3bZxMpmo9weSE8uhbH0C
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=blf1TjsMyU6Lk_0jxDM_MLX5tk4XCToGxzwXWI333Po,247842
39
+ seleniumbase/core/browser_launcher.py,sha256=BmL3ppQ4A4E5OKxJhhjqCKymBgGNC7iiWI4VTsSNvfE,247964
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=OBqNiCC_11ctpsD72KV4YUaKovmSpvs14HP1gwFesBA,25190
51
51
  seleniumbase/core/report_helper.py,sha256=AIl6Qava2yW1uSzbLpJBlPlYDz0KE-rVhogh8hsGWBo,12201
52
52
  seleniumbase/core/s3_manager.py,sha256=z_4qx2jI_gtK5r3niGXgEOBpfMUicUCOciowai50MP4,3529
53
- seleniumbase/core/sb_cdp.py,sha256=5HttSd6ZKAJK_7IPbKDYuc7gzybIc5u6zmKSqyHIM6s,100461
53
+ seleniumbase/core/sb_cdp.py,sha256=jaCBjRUxpOdc1iKeHXIE6-eFOlhJ06gV7HuT9F15s_Q,101601
54
54
  seleniumbase/core/sb_driver.py,sha256=yUdS9_9OXTVaWzp1qY7msvnsvCK8X3FIcxMixb0BuBE,13827
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
@@ -67,7 +67,7 @@ seleniumbase/extensions/disable_csp.zip,sha256=5RvomXnm2PdivUVcxTV6jfvD8WhTEsQYH
67
67
  seleniumbase/extensions/recorder.zip,sha256=JEE_FVEvlS63cFQbVLEroIyPSS91nWCDL0MhjVrmIpk,11813
68
68
  seleniumbase/extensions/sbase_ext.zip,sha256=3s1N8zrVaMz8RQEOIoBzC3KDjtmHwVZRvVsX25Odr_s,8175
69
69
  seleniumbase/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
- seleniumbase/fixtures/base_case.py,sha256=XIljHhCgs4xS_7zo8EZgzHSsBeXgiLrHGmAyojttUQY,737062
70
+ seleniumbase/fixtures/base_case.py,sha256=Js_juiDsKT_zotEk3soKMh1mf-eaVCbYUHhtoiNXXFw,737322
71
71
  seleniumbase/fixtures/constants.py,sha256=WMrItuNyKq3XVJ64NluLIRc4gJCxDw8K8qXED0b9S2w,13752
72
72
  seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
73
73
  seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
@@ -90,7 +90,7 @@ seleniumbase/plugins/basic_test_info.py,sha256=8ov6n417gPbqqvrlT4zrch7l2XcRt-GF2
90
90
  seleniumbase/plugins/db_reporting_plugin.py,sha256=En09qUCoojrk9-vbcnsoHdSELoGmag2GDIyu3jTiJas,7331
91
91
  seleniumbase/plugins/driver_manager.py,sha256=VSYQgDDA2t34gi-3qPkw5Ef9SX8sVQX3RETHOihyKHc,36558
92
92
  seleniumbase/plugins/page_source.py,sha256=loTnXxOj4kxEukuTZEiGyvKBhY3KDVDMnNlHHheTBDE,1889
93
- seleniumbase/plugins/pytest_plugin.py,sha256=KlHfzOm71qBdaneBREBBEuFMl_HN8uQMmhZGC7nGm2Y,108818
93
+ seleniumbase/plugins/pytest_plugin.py,sha256=vg2Xpn5kMMQgui5doVG1kCzCCES1WHeig4X80Kq45HY,108933
94
94
  seleniumbase/plugins/s3_logging_plugin.py,sha256=WDfertQgGOW_SRJpFMaekYD6vBVW9VO62POtXXy2HCM,2319
95
95
  seleniumbase/plugins/sb_manager.py,sha256=ulTDorccan06eVYtSqlX26EFKXmS0gCY0huJ67Q5gTY,58082
96
96
  seleniumbase/plugins/screen_shots.py,sha256=1hrXw-hzuZ1BR6Yh7AyWX2ABnvnP73-RCbwdz958gj4,1127
@@ -137,9 +137,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.bat,sha256=Ftq-GrAKRYH2ssDPr
137
137
  seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443QFK8PryBpDmKn5Gy0s4o0vDSM,106
138
138
  seleniumbase/utilities/selenium_ide/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
139
139
  seleniumbase/utilities/selenium_ide/convert_ide.py,sha256=pZFnqEJQEKZPyNFjkLD29s2HPQgCrWW9XJWpCPhWOoM,31691
140
- seleniumbase-4.41.3.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
141
- seleniumbase-4.41.3.dist-info/METADATA,sha256=VcWEKRpNA3DE-q2DczW6NA4TNtnJo42UB-JZHYBCCYc,87563
142
- seleniumbase-4.41.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
143
- seleniumbase-4.41.3.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
144
- seleniumbase-4.41.3.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
145
- seleniumbase-4.41.3.dist-info/RECORD,,
140
+ seleniumbase-4.41.5.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
141
+ seleniumbase-4.41.5.dist-info/METADATA,sha256=E_rrkPt4RwHKIfxUNyNIw5xP1AhLbUCSQxua5T1CY2s,87565
142
+ seleniumbase-4.41.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
143
+ seleniumbase-4.41.5.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
144
+ seleniumbase-4.41.5.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
145
+ seleniumbase-4.41.5.dist-info/RECORD,,