seleniumbase 4.28.5__py3-none-any.whl → 4.28.7__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.28.5"
2
+ __version__ = "4.28.7"
@@ -586,6 +586,29 @@ def install_pyautogui_if_missing(driver):
586
586
  shared_utils.pip_install(
587
587
  "pyautogui", version=constants.PyAutoGUI.VER
588
588
  )
589
+ try:
590
+ import pyautogui
591
+ except Exception:
592
+ if (
593
+ IS_LINUX
594
+ and hasattr(sb_config, "xvfb")
595
+ and hasattr(sb_config, "headed")
596
+ and hasattr(sb_config, "headless")
597
+ and hasattr(sb_config, "headless2")
598
+ and (not sb_config.headed or sb_config.xvfb)
599
+ and not (sb_config.headless or sb_config.headless2)
600
+ ):
601
+ from sbvirtualdisplay import Display
602
+ try:
603
+ xvfb_display = Display(
604
+ visible=True,
605
+ size=(1366, 768),
606
+ backend="xvfb",
607
+ use_xauth=True,
608
+ )
609
+ xvfb_display.start()
610
+ except Exception:
611
+ pass
589
612
 
590
613
 
591
614
  def get_configured_pyautogui(pyautogui_copy):
@@ -657,6 +680,8 @@ def get_gui_element_position(driver, selector):
657
680
  viewport_height = driver.execute_script("return window.innerHeight;")
658
681
  viewport_x = window_rect["x"] + element_rect["x"]
659
682
  viewport_y = window_bottom_y - viewport_height + element_rect["y"]
683
+ y_scroll_offset = driver.execute_script("return window.pageYOffset;")
684
+ viewport_y = viewport_y - y_scroll_offset
660
685
  return (viewport_x, viewport_y)
661
686
 
662
687
 
@@ -665,7 +690,7 @@ def _uc_gui_click_x_y(driver, x, y, timeframe=0.25, uc_lock=False):
665
690
  import pyautogui
666
691
  pyautogui = get_configured_pyautogui(pyautogui)
667
692
  screen_width, screen_height = pyautogui.size()
668
- if x > screen_width or y > screen_height:
693
+ if x < 0 or y < 0 or x > screen_width or y > screen_height:
669
694
  raise Exception(
670
695
  "PyAutoGUI cannot click on point (%s, %s)"
671
696
  " outside screen. (Width: %s, Height: %s)"
@@ -784,6 +809,16 @@ def _uc_gui_click_captcha(
784
809
  frame = '[data-callback="onCaptchaSuccess"]'
785
810
  else:
786
811
  return
812
+ if driver.is_element_present('form[class*=center]'):
813
+ script = (
814
+ """var $elements = document.querySelectorAll('form');
815
+ var index = 0, length = $elements.length;
816
+ for(; index < length; index++){
817
+ the_class = $elements[index].getAttribute('class');
818
+ new_class = the_class.replaceAll('center', 'left');
819
+ $elements[index].setAttribute('class', new_class);}"""
820
+ )
821
+ driver.execute_script(script)
787
822
  if not is_in_frame or needs_switch:
788
823
  # Currently not in frame (or nested frame outside CF one)
789
824
  try:
@@ -954,7 +989,7 @@ def uc_gui_handle_cf(driver, frame="iframe"):
954
989
  return
955
990
  try:
956
991
  found_checkbox = False
957
- for i in range(10):
992
+ for i in range(24):
958
993
  pyautogui.press("\t")
959
994
  time.sleep(0.02)
960
995
  active_element_css = js_utils.get_active_element_css(driver)
@@ -964,7 +999,6 @@ def uc_gui_handle_cf(driver, frame="iframe"):
964
999
  time.sleep(0.02)
965
1000
  if not found_checkbox:
966
1001
  return
967
- driver.execute_script('document.querySelector("input").focus()')
968
1002
  except Exception:
969
1003
  try:
970
1004
  driver.switch_to.default_content()
@@ -3418,6 +3418,8 @@ class BaseCase(unittest.TestCase):
3418
3418
  viewport_height = self.execute_script("return window.innerHeight;")
3419
3419
  x = math.ceil(window_rect["x"] + i_x + element_rect["x"])
3420
3420
  y = math.ceil(w_bottom_y - viewport_height + i_y + element_rect["y"])
3421
+ y_scroll_offset = self.execute_script("return window.pageYOffset;")
3422
+ y = int(y - y_scroll_offset)
3421
3423
  if iframe_switch:
3422
3424
  self.switch_to_frame()
3423
3425
  if not self.is_element_present(selector, by=by):
@@ -13788,31 +13790,33 @@ class BaseCase(unittest.TestCase):
13788
13790
  which is the default mode on Linux unless using another arg."""
13789
13791
  if "linux" in sys.platform and (not self.headed or self.xvfb):
13790
13792
  from sbvirtualdisplay import Display
13791
- if self.undetectable and not (self.headless or self.headless2):
13792
- import Xlib.display
13793
- try:
13794
- self._xvfb_display = Display(
13795
- visible=True,
13796
- size=(1366, 768),
13797
- backend="xvfb",
13798
- use_xauth=True,
13799
- )
13800
- self._xvfb_display.start()
13801
- if "DISPLAY" not in os.environ.keys():
13793
+ pip_find_lock = fasteners.InterProcessLock(
13794
+ constants.PipInstall.FINDLOCK
13795
+ )
13796
+ with pip_find_lock: # Prevent issues with multiple processes
13797
+ if self.undetectable and not (self.headless or self.headless2):
13798
+ import Xlib.display
13799
+ try:
13800
+ self._xvfb_display = Display(
13801
+ visible=True,
13802
+ size=(1366, 768),
13803
+ backend="xvfb",
13804
+ use_xauth=True,
13805
+ )
13806
+ self._xvfb_display.start()
13807
+ if "DISPLAY" not in os.environ.keys():
13808
+ print(
13809
+ "\nX11 display failed! Will use regular xvfb!"
13810
+ )
13811
+ self.__activate_standard_virtual_display()
13812
+ except Exception as e:
13813
+ if hasattr(e, "msg"):
13814
+ print("\n" + str(e.msg))
13815
+ else:
13816
+ print(e)
13802
13817
  print("\nX11 display failed! Will use regular xvfb!")
13803
13818
  self.__activate_standard_virtual_display()
13804
- except Exception as e:
13805
- if hasattr(e, "msg"):
13806
- print("\n" + str(e.msg))
13807
- else:
13808
- print(e)
13809
- print("\nX11 display failed! Will use regular xvfb!")
13810
- self.__activate_standard_virtual_display()
13811
- return
13812
- pip_find_lock = fasteners.InterProcessLock(
13813
- constants.PipInstall.FINDLOCK
13814
- )
13815
- with pip_find_lock: # Prevent issues with multiple processes
13819
+ return
13816
13820
  pyautogui_is_installed = False
13817
13821
  try:
13818
13822
  import pyautogui
@@ -13854,8 +13858,8 @@ class BaseCase(unittest.TestCase):
13854
13858
  print("\n" + str(e.msg))
13855
13859
  else:
13856
13860
  print(e)
13857
- else:
13858
- self.__activate_standard_virtual_display()
13861
+ else:
13862
+ self.__activate_standard_virtual_display()
13859
13863
 
13860
13864
  def __ad_block_as_needed(self):
13861
13865
  """This is an internal method for handling ad-blocking.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: seleniumbase
3
- Version: 4.28.5
3
+ Version: 4.28.7
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
@@ -60,7 +60,7 @@ Description-Content-Type: text/markdown
60
60
  License-File: LICENSE
61
61
  Requires-Dist: attrs >=23.2.0
62
62
  Requires-Dist: certifi >=2024.7.4
63
- Requires-Dist: exceptiongroup >=1.2.1
63
+ Requires-Dist: exceptiongroup >=1.2.2
64
64
  Requires-Dist: parse >=1.20.2
65
65
  Requires-Dist: parse-type >=0.6.2
66
66
  Requires-Dist: pyyaml >=6.0.1
@@ -69,7 +69,7 @@ Requires-Dist: idna ==3.7
69
69
  Requires-Dist: chardet ==5.2.0
70
70
  Requires-Dist: charset-normalizer ==3.3.2
71
71
  Requires-Dist: requests ==2.31.0
72
- Requires-Dist: pynose ==1.5.1
72
+ Requires-Dist: pynose ==1.5.2
73
73
  Requires-Dist: sniffio ==1.3.1
74
74
  Requires-Dist: h11 ==0.14.0
75
75
  Requires-Dist: outcome ==1.3.0.post0
@@ -86,8 +86,8 @@ Requires-Dist: parameterized ==0.9.0
86
86
  Requires-Dist: sbvirtualdisplay ==1.3.0
87
87
  Requires-Dist: behave ==1.2.6
88
88
  Requires-Dist: beautifulsoup4 ==4.12.3
89
- Requires-Dist: tabcompleter ==1.3.0
90
- Requires-Dist: pdbp ==1.5.1
89
+ Requires-Dist: tabcompleter ==1.3.3
90
+ Requires-Dist: pdbp ==1.5.3
91
91
  Requires-Dist: colorama ==0.4.6
92
92
  Requires-Dist: pyotp ==2.9.0
93
93
  Requires-Dist: mdurl ==0.1.2
@@ -112,10 +112,10 @@ Requires-Dist: pytest-xdist ==3.5.0 ; python_version < "3.8"
112
112
  Requires-Dist: soupsieve ==2.4.1 ; python_version < "3.8"
113
113
  Requires-Dist: pygments ==2.17.2 ; python_version < "3.8"
114
114
  Requires-Dist: markdown-it-py ==2.2.0 ; python_version < "3.8"
115
+ Requires-Dist: setuptools >=70.2.0 ; python_version >= "3.10"
115
116
  Requires-Dist: urllib3 <2.3.0,>=1.26.19 ; python_version >= "3.10"
116
117
  Requires-Dist: pip >=24.1.2 ; python_version >= "3.8"
117
118
  Requires-Dist: packaging >=24.1 ; python_version >= "3.8"
118
- Requires-Dist: setuptools >=70.2.0 ; python_version >= "3.8"
119
119
  Requires-Dist: wheel >=0.43.0 ; python_version >= "3.8"
120
120
  Requires-Dist: filelock >=3.15.4 ; python_version >= "3.8"
121
121
  Requires-Dist: platformdirs >=4.2.2 ; python_version >= "3.8"
@@ -125,13 +125,14 @@ Requires-Dist: websocket-client ==1.8.0 ; python_version >= "3.8"
125
125
  Requires-Dist: selenium ==4.22.0 ; python_version >= "3.8"
126
126
  Requires-Dist: execnet ==2.1.1 ; python_version >= "3.8"
127
127
  Requires-Dist: pluggy ==1.5.0 ; python_version >= "3.8"
128
- Requires-Dist: pytest ==8.2.1 ; python_version >= "3.8"
128
+ Requires-Dist: pytest ==8.3.1 ; python_version >= "3.8"
129
129
  Requires-Dist: pytest-metadata ==3.1.1 ; python_version >= "3.8"
130
130
  Requires-Dist: pytest-rerunfailures ==14.0 ; python_version >= "3.8"
131
131
  Requires-Dist: pytest-xdist ==3.6.1 ; python_version >= "3.8"
132
132
  Requires-Dist: soupsieve ==2.5 ; python_version >= "3.8"
133
133
  Requires-Dist: pygments ==2.18.0 ; python_version >= "3.8"
134
134
  Requires-Dist: markdown-it-py ==3.0.0 ; python_version >= "3.8"
135
+ Requires-Dist: setuptools ~=70.2 ; python_version >= "3.8" and python_version < "3.10"
135
136
  Provides-Extra: allure
136
137
  Requires-Dist: allure-pytest >=2.13.5 ; extra == 'allure'
137
138
  Requires-Dist: allure-python-commons >=2.13.5 ; extra == 'allure'
@@ -139,7 +140,7 @@ Requires-Dist: allure-behave >=2.13.5 ; extra == 'allure'
139
140
  Provides-Extra: coverage
140
141
  Requires-Dist: coverage ==7.2.7 ; (python_version < "3.8") and extra == 'coverage'
141
142
  Requires-Dist: pytest-cov ==4.1.0 ; (python_version < "3.8") and extra == 'coverage'
142
- Requires-Dist: coverage >=7.5.4 ; (python_version >= "3.8") and extra == 'coverage'
143
+ Requires-Dist: coverage >=7.6.0 ; (python_version >= "3.8") and extra == 'coverage'
143
144
  Requires-Dist: pytest-cov >=5.0.0 ; (python_version >= "3.8") and extra == 'coverage'
144
145
  Provides-Extra: flake8
145
146
  Requires-Dist: mccabe ==0.7.0 ; extra == 'flake8'
@@ -159,7 +160,7 @@ Requires-Dist: cffi ==1.15.1 ; (python_version < "3.8") and extra == 'pdfminer'
159
160
  Requires-Dist: cryptography ==39.0.2 ; (python_version < "3.9") and extra == 'pdfminer'
160
161
  Requires-Dist: pdfminer.six ==20240706 ; (python_version >= "3.8") and extra == 'pdfminer'
161
162
  Requires-Dist: cffi ==1.16.0 ; (python_version >= "3.8") and extra == 'pdfminer'
162
- Requires-Dist: cryptography ==42.0.8 ; (python_version >= "3.9") and extra == 'pdfminer'
163
+ Requires-Dist: cryptography ==43.0.0 ; (python_version >= "3.9") and extra == 'pdfminer'
163
164
  Provides-Extra: pillow
164
165
  Requires-Dist: Pillow ==9.5.0 ; (python_version < "3.8") and extra == 'pillow'
165
166
  Requires-Dist: Pillow >=10.4.0 ; (python_version >= "3.8") and extra == 'pillow'
@@ -175,13 +176,14 @@ Provides-Extra: selenium-stealth
175
176
  Requires-Dist: selenium-stealth ==1.0.6 ; extra == 'selenium-stealth'
176
177
  Provides-Extra: selenium-wire
177
178
  Requires-Dist: selenium-wire ==5.1.0 ; extra == 'selenium-wire'
179
+ Requires-Dist: pyOpenSSL ==24.2.1 ; extra == 'selenium-wire'
178
180
  Requires-Dist: Brotli ==1.1.0 ; extra == 'selenium-wire'
179
181
  Requires-Dist: blinker ==1.7.0 ; extra == 'selenium-wire'
180
182
  Requires-Dist: h2 ==4.1.0 ; extra == 'selenium-wire'
181
183
  Requires-Dist: hpack ==4.0.0 ; extra == 'selenium-wire'
182
184
  Requires-Dist: hyperframe ==6.0.1 ; extra == 'selenium-wire'
183
185
  Requires-Dist: kaitaistruct ==0.10 ; extra == 'selenium-wire'
184
- Requires-Dist: zstandard ==0.22.0 ; extra == 'selenium-wire'
186
+ Requires-Dist: zstandard ==0.23.0 ; extra == 'selenium-wire'
185
187
  Requires-Dist: pyasn1 ==0.5.1 ; (python_version < "3.8") and extra == 'selenium-wire'
186
188
  Requires-Dist: pyasn1 ==0.6.0 ; (python_version >= "3.8") and extra == 'selenium-wire'
187
189
 
@@ -5,7 +5,7 @@ sbase/steps.py,sha256=bKT_u5bJkKzYWEuAXi9NVVRYYxQRCM1_YJUrNFFRVPY,42865
5
5
  seleniumbase/ReadMe.md,sha256=4nEdto4d0Ch0Zneg0yAC-RBBdqRqPUP0SCo-ze_XDPM,3612
6
6
  seleniumbase/__init__.py,sha256=dgq30q6wGO2fJOVYemxC5hLxzv-of-MRn5P1YarBq5k,2263
7
7
  seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
8
- seleniumbase/__version__.py,sha256=fi9wVefZcn8xh6-DIKJewbq8lsrNyHHdHJOlTqp3mcE,46
8
+ seleniumbase/__version__.py,sha256=kVSnT5N8KYNYTsM_uONfqxrZEe5XZMntq2yqh5g03tY,46
9
9
  seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  seleniumbase/behave/behave_helper.py,sha256=elkl8P9eLulRAioLstE9baYNM9N_PHBmAOcajX-pH_Y,24198
11
11
  seleniumbase/behave/behave_sb.py,sha256=q4uYZixZBf7VYWnQnEk2weTcyMy1X1faR3vyYvUzDiA,56406
@@ -40,7 +40,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=yo641b_OdSE0GUauOyxk-QrNeIjYzbRY
40
40
  seleniumbase/console_scripts/sb_recorder.py,sha256=UQQhnAR18dbcC7ToDvj6TM2PIG5qBrNaekaM6kSK_E8,10970
41
41
  seleniumbase/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
42
  seleniumbase/core/application_manager.py,sha256=e_0sjtI8cjY5BNyZj1QBR0j6_oCScxGmSXYEpcYwuZE,576
43
- seleniumbase/core/browser_launcher.py,sha256=J-YrGmQg3teXszuaR8j08kzgnRBVyMwyRQkCnzgg2bA,187662
43
+ seleniumbase/core/browser_launcher.py,sha256=_b1Fik4AkoZT96CeNb_Ra5cwPDo5qkO9DsG0ZWP-R9U,189231
44
44
  seleniumbase/core/capabilities_parser.py,sha256=meIS2uHapTCq2ldfNAToC7r0cKmZDRXuYNKExM1GHDY,6038
45
45
  seleniumbase/core/colored_traceback.py,sha256=DrRWfg7XEnKcgY59Xj7Jdk09H-XqHYBSUpB-DiZt6iY,2020
46
46
  seleniumbase/core/create_db_tables.sql,sha256=VWPtrdiW_HQ6yETHjqTu-VIrTwvd8I8o1NfBeaVSHpU,972
@@ -70,7 +70,7 @@ seleniumbase/extensions/disable_csp.zip,sha256=YMifIIgEBiLrEFrS1sfW4Exh4br1V4oK1
70
70
  seleniumbase/extensions/recorder.zip,sha256=OOyzF-Ize2cSRu1CqhzSAq5vusI9hqLLd2OIApUHesI,11918
71
71
  seleniumbase/extensions/sbase_ext.zip,sha256=3s1N8zrVaMz8RQEOIoBzC3KDjtmHwVZRvVsX25Odr_s,8175
72
72
  seleniumbase/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
- seleniumbase/fixtures/base_case.py,sha256=oaWxRanC4KVZGrZ-DjrpFTCsBL3PENVWm5kl8_9JDx0,701361
73
+ seleniumbase/fixtures/base_case.py,sha256=pWWWCBg_L1d0nfuK6g0rtlf232CvolEdUomxhmylG6A,701612
74
74
  seleniumbase/fixtures/constants.py,sha256=TapuGLdERtvZPGMblVXkNGybr8tj8FMtN3sbJ3ygyoc,13569
75
75
  seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
76
76
  seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
@@ -137,9 +137,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443
137
137
  seleniumbase/utilities/selenium_ide/ReadMe.md,sha256=hznGeuMpkIimqMiZBW-4goIy2ltW4l8X9kb0YSPUQfE,4483
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.28.5.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
141
- seleniumbase-4.28.5.dist-info/METADATA,sha256=ZuuvKLP50pY2HsIkp70zhjApZYUe2FY_z9SefBEAF_8,85546
142
- seleniumbase-4.28.5.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
143
- seleniumbase-4.28.5.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
144
- seleniumbase-4.28.5.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
145
- seleniumbase-4.28.5.dist-info/RECORD,,
140
+ seleniumbase-4.28.7.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
141
+ seleniumbase-4.28.7.dist-info/METADATA,sha256=acR0P3b6rOk_ng8oidhHyr17HllDoYN8eRmS2sf1oKs,85695
142
+ seleniumbase-4.28.7.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
143
+ seleniumbase-4.28.7.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
144
+ seleniumbase-4.28.7.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
145
+ seleniumbase-4.28.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.2.0)
2
+ Generator: setuptools (71.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5