seleniumbase 4.41.2__py3-none-any.whl → 4.41.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.41.2"
2
+ __version__ = "4.41.4"
@@ -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
@@ -3137,7 +3139,9 @@ def get_driver(
3137
3139
  proxy_string, proxy_scheme = proxy_helper.validate_proxy_string(
3138
3140
  proxy_string, keep_scheme=True
3139
3141
  )
3140
- if proxy_string and proxy_user and proxy_pass:
3142
+ if proxy_user and not proxy_pass:
3143
+ proxy_pass = ""
3144
+ if proxy_string and proxy_user:
3141
3145
  proxy_auth = True
3142
3146
  elif proxy_pac_url:
3143
3147
  username_and_password = None
@@ -3164,7 +3168,9 @@ def get_driver(
3164
3168
  )
3165
3169
  if not proxy_pac_url.lower().endswith(".pac"):
3166
3170
  raise Exception('The proxy PAC URL must end with ".pac"!')
3167
- if proxy_pac_url and proxy_user and proxy_pass:
3171
+ if proxy_user and not proxy_pass:
3172
+ proxy_pass = ""
3173
+ if proxy_pac_url and proxy_user:
3168
3174
  proxy_auth = True
3169
3175
  if (
3170
3176
  is_using_uc(undetectable, browser_name)
@@ -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,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seleniumbase
3
- Version: 4.41.2
3
+ Version: 4.41.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
@@ -118,18 +118,19 @@ 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
130
130
  Requires-Dist: behave==1.2.6
131
- Requires-Dist: soupsieve==2.7
132
- Requires-Dist: beautifulsoup4<4.14,>=4.13.5
131
+ Requires-Dist: soupsieve==2.7; python_version < "3.9"
132
+ Requires-Dist: soupsieve~=2.8; python_version >= "3.9"
133
+ Requires-Dist: beautifulsoup4~=4.13.5
133
134
  Requires-Dist: pyotp==2.9.0
134
135
  Requires-Dist: python-xlib==0.33; platform_system == "Linux"
135
136
  Requires-Dist: markdown-it-py==3.0.0; python_version < "3.10"
@@ -142,7 +143,7 @@ Requires-Dist: allure-python-commons>=2.13.5; extra == "allure"
142
143
  Requires-Dist: allure-behave>=2.13.5; extra == "allure"
143
144
  Provides-Extra: coverage
144
145
  Requires-Dist: coverage>=7.6.1; python_version < "3.9" and extra == "coverage"
145
- 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"
146
147
  Requires-Dist: pytest-cov>=5.0.0; python_version < "3.9" and extra == "coverage"
147
148
  Requires-Dist: pytest-cov>=6.2.1; python_version >= "3.9" and extra == "coverage"
148
149
  Provides-Extra: flake8
@@ -163,7 +164,7 @@ Provides-Extra: pdfminer
163
164
  Requires-Dist: pdfminer.six==20250324; python_version < "3.9" and extra == "pdfminer"
164
165
  Requires-Dist: pdfminer.six==20250506; python_version >= "3.9" and extra == "pdfminer"
165
166
  Requires-Dist: cryptography==39.0.2; python_version < "3.9" and extra == "pdfminer"
166
- 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"
167
168
  Requires-Dist: cffi==1.17.1; extra == "pdfminer"
168
169
  Requires-Dist: pycparser==2.22; extra == "pdfminer"
169
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=ZyfXu0aOBZHSqkS5yxS9fAUyg-y0JTxnmYBJ6YyVB04,46
6
+ seleniumbase/__version__.py,sha256=2r-jsrbUG3cz0wQ_tWf3HopHeihmlbSqQ0-YZDfhxOE,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=HKXqGykDUTflUYL-5Y-8DqxgNjq8mYXayARYYV-eaxA,247732
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
@@ -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.2.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
141
- seleniumbase-4.41.2.dist-info/METADATA,sha256=b-68nE0Tj2sDFfVAqvJ0Zix7jfof6zflUL8d1-Yn9jo,87490
142
- seleniumbase-4.41.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
143
- seleniumbase-4.41.2.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
144
- seleniumbase-4.41.2.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
145
- seleniumbase-4.41.2.dist-info/RECORD,,
140
+ seleniumbase-4.41.4.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
141
+ seleniumbase-4.41.4.dist-info/METADATA,sha256=E8oI4F0ocRKmeLCuwsTgz-hYG_Ux4VrLWLxe9MOHv7w,87565
142
+ seleniumbase-4.41.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
143
+ seleniumbase-4.41.4.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
144
+ seleniumbase-4.41.4.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
145
+ seleniumbase-4.41.4.dist-info/RECORD,,