seleniumbase 4.29.6__py3-none-any.whl → 4.29.8__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.29.6"
2
+ __version__ = "4.29.8"
@@ -50,7 +50,7 @@ IS_WINDOWS = shared_utils.is_windows()
50
50
  DRIVER_DIR = os.path.dirname(os.path.realpath(drivers.__file__))
51
51
  LOCAL_PATH = "/usr/local/bin/" # On Mac and Linux systems
52
52
  DEFAULT_CHROMEDRIVER_VERSION = "114.0.5735.90" # (If can't find LATEST_STABLE)
53
- DEFAULT_GECKODRIVER_VERSION = "v0.34.0"
53
+ DEFAULT_GECKODRIVER_VERSION = "v0.35.0"
54
54
  DEFAULT_EDGEDRIVER_VERSION = "115.0.1901.183" # (If can't find LATEST_STABLE)
55
55
 
56
56
 
@@ -781,6 +781,7 @@ def _uc_gui_click_captcha(
781
781
  )
782
782
  with gui_lock: # Prevent issues with multiple processes
783
783
  needs_switch = False
784
+ width_ratio = 1.0
784
785
  is_in_frame = js_utils.is_in_frame(driver)
785
786
  if is_in_frame and driver.is_element_present("#challenge-stage"):
786
787
  driver.switch_to.parent_frame()
@@ -791,6 +792,20 @@ def _uc_gui_click_captcha(
791
792
  page_actions.switch_to_window(
792
793
  driver, driver.current_window_handle, 2, uc_lock=False
793
794
  )
795
+ if IS_WINDOWS:
796
+ window_rect = driver.get_window_rect()
797
+ width = window_rect["width"]
798
+ height = window_rect["height"]
799
+ win_x = window_rect["x"]
800
+ win_y = window_rect["y"]
801
+ scr_width = pyautogui.size().width
802
+ driver.maximize_window()
803
+ win_width = driver.get_window_size()["width"]
804
+ width_ratio = round(float(scr_width) / float(win_width), 2) + 0.01
805
+ if width_ratio < 0.45 or width_ratio > 2.55:
806
+ width_ratio = 1.01
807
+ driver.minimize_window()
808
+ driver.set_window_rect(win_x, win_y, width, height)
794
809
  if ctype == "cf_t":
795
810
  if (
796
811
  driver.is_element_present(".cf-turnstile-wrapper iframe")
@@ -885,8 +900,8 @@ def _uc_gui_click_captcha(
885
900
  y = i_y + element.rect["y"] + int(element.rect["height"] / 2)
886
901
  y += 1
887
902
  else:
888
- x = i_x + 34
889
- y = i_y + 34
903
+ x = (i_x + 34) * width_ratio
904
+ y = (i_y + 34) * width_ratio
890
905
  driver.switch_to.default_content()
891
906
  except Exception:
892
907
  try:
@@ -1015,6 +1030,18 @@ def _uc_gui_handle_captcha(
1015
1030
  page_actions.switch_to_window(
1016
1031
  driver, driver.current_window_handle, 2, uc_lock=False
1017
1032
  )
1033
+ if IS_WINDOWS and hasattr(pyautogui, "getActiveWindowTitle"):
1034
+ py_a_g_title = pyautogui.getActiveWindowTitle()
1035
+ window_title = driver.title
1036
+ if not py_a_g_title.startswith(window_title):
1037
+ window_rect = driver.get_window_rect()
1038
+ width = window_rect["width"]
1039
+ height = window_rect["height"]
1040
+ win_x = window_rect["x"]
1041
+ win_y = window_rect["y"]
1042
+ driver.minimize_window()
1043
+ driver.set_window_rect(win_x, win_y, width, height)
1044
+ time.sleep(0.33)
1018
1045
  if ctype == "cf_t":
1019
1046
  if (
1020
1047
  driver.is_element_present(".cf-turnstile-wrapper iframe")
@@ -1688,7 +1715,10 @@ def _set_chrome_options(
1688
1715
  chrome_options.add_argument("--ignore-certificate-errors")
1689
1716
  if not enable_ws:
1690
1717
  chrome_options.add_argument("--disable-web-security")
1691
- if IS_LINUX or not is_using_uc(undetectable, browser_name):
1718
+ if (
1719
+ IS_LINUX
1720
+ or (IS_MAC and not is_using_uc(undetectable, browser_name))
1721
+ ):
1692
1722
  chrome_options.add_argument("--no-sandbox")
1693
1723
  if remote_debug:
1694
1724
  # To access the Debugger, go to: chrome://inspect/#devices
@@ -3405,7 +3435,10 @@ def get_local_driver(
3405
3435
  edge_options.add_argument("--allow-running-insecure-content")
3406
3436
  if user_agent:
3407
3437
  edge_options.add_argument("--user-agent=%s" % user_agent)
3408
- if IS_LINUX or not is_using_uc(undetectable, browser_name):
3438
+ if (
3439
+ IS_LINUX
3440
+ or (IS_MAC and not is_using_uc(undetectable, browser_name))
3441
+ ):
3409
3442
  edge_options.add_argument("--no-sandbox")
3410
3443
  if remote_debug:
3411
3444
  # To access the Debugger, go to: edge://inspect/#devices
@@ -114,6 +114,13 @@ def recalculate_selector(selector, by, xp_ok=True):
114
114
  by = By.XPATH
115
115
  if by == "":
116
116
  by = By.CSS_SELECTOR
117
+ if not is_valid_by(by):
118
+ valid_by_options = [
119
+ "css selector", "link text", "partial link text",
120
+ "name", "xpath", "id", "tag name", "class name",
121
+ ]
122
+ msg = "Choose a `by` from: %s." % valid_by_options
123
+ raise Exception('Invalid `by`: "%s"\n%s' % (by, msg))
117
124
  return (selector, by)
118
125
 
119
126
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: seleniumbase
3
- Version: 4.29.6
3
+ Version: 4.29.8
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
@@ -58,12 +58,11 @@ Classifier: Topic :: Utilities
58
58
  Requires-Python: >=3.7
59
59
  Description-Content-Type: text/markdown
60
60
  License-File: LICENSE
61
- Requires-Dist: attrs >=23.2.0
61
+ Requires-Dist: attrs >=24.2.0
62
62
  Requires-Dist: certifi >=2024.7.4
63
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
- Requires-Dist: pyyaml >=6.0.1
67
66
  Requires-Dist: six ==1.16.0
68
67
  Requires-Dist: idna ==3.7
69
68
  Requires-Dist: chardet ==5.2.0
@@ -101,6 +100,7 @@ Requires-Dist: setuptools >=68.0.0 ; python_version < "3.8"
101
100
  Requires-Dist: wheel >=0.42.0 ; python_version < "3.8"
102
101
  Requires-Dist: filelock >=3.12.2 ; python_version < "3.8"
103
102
  Requires-Dist: platformdirs >=4.0.0 ; python_version < "3.8"
103
+ Requires-Dist: pyyaml ==6.0.1 ; python_version < "3.8"
104
104
  Requires-Dist: trio ==0.22.2 ; python_version < "3.8"
105
105
  Requires-Dist: selenium ==4.11.2 ; python_version < "3.8"
106
106
  Requires-Dist: execnet ==2.0.2 ; python_version < "3.8"
@@ -116,11 +116,12 @@ Requires-Dist: setuptools >=70.2.0 ; python_version >= "3.10"
116
116
  Requires-Dist: urllib3 <2.3.0,>=1.26.19 ; python_version >= "3.10"
117
117
  Requires-Dist: pip >=24.1.2 ; python_version >= "3.8"
118
118
  Requires-Dist: packaging >=24.1 ; python_version >= "3.8"
119
- Requires-Dist: wheel >=0.43.0 ; python_version >= "3.8"
119
+ Requires-Dist: wheel >=0.44.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"
122
122
  Requires-Dist: typing-extensions >=4.12.2 ; python_version >= "3.8"
123
- Requires-Dist: trio ==0.26.0 ; python_version >= "3.8"
123
+ Requires-Dist: pyyaml >=6.0.2 ; python_version >= "3.8"
124
+ Requires-Dist: trio ==0.26.1 ; python_version >= "3.8"
124
125
  Requires-Dist: websocket-client ==1.8.0 ; python_version >= "3.8"
125
126
  Requires-Dist: selenium ==4.23.1 ; python_version >= "3.8"
126
127
  Requires-Dist: execnet ==2.1.1 ; python_version >= "3.8"
@@ -140,16 +141,16 @@ Requires-Dist: allure-behave >=2.13.5 ; extra == 'allure'
140
141
  Provides-Extra: coverage
141
142
  Requires-Dist: coverage ==7.2.7 ; (python_version < "3.8") and extra == 'coverage'
142
143
  Requires-Dist: pytest-cov ==4.1.0 ; (python_version < "3.8") and extra == 'coverage'
143
- Requires-Dist: coverage >=7.6.0 ; (python_version >= "3.8") and extra == 'coverage'
144
+ Requires-Dist: coverage >=7.6.1 ; (python_version >= "3.8") and extra == 'coverage'
144
145
  Requires-Dist: pytest-cov >=5.0.0 ; (python_version >= "3.8") and extra == 'coverage'
145
146
  Provides-Extra: flake8
146
147
  Requires-Dist: mccabe ==0.7.0 ; extra == 'flake8'
147
148
  Requires-Dist: flake8 ==5.0.4 ; (python_version < "3.9") and extra == 'flake8'
148
149
  Requires-Dist: pyflakes ==2.5.0 ; (python_version < "3.9") and extra == 'flake8'
149
150
  Requires-Dist: pycodestyle ==2.9.1 ; (python_version < "3.9") and extra == 'flake8'
150
- Requires-Dist: flake8 ==7.1.0 ; (python_version >= "3.9") and extra == 'flake8'
151
+ Requires-Dist: flake8 ==7.1.1 ; (python_version >= "3.9") and extra == 'flake8'
151
152
  Requires-Dist: pyflakes ==3.2.0 ; (python_version >= "3.9") and extra == 'flake8'
152
- Requires-Dist: pycodestyle ==2.12.0 ; (python_version >= "3.9") and extra == 'flake8'
153
+ Requires-Dist: pycodestyle ==2.12.1 ; (python_version >= "3.9") and extra == 'flake8'
153
154
  Provides-Extra: ipdb
154
155
  Requires-Dist: ipdb ==0.13.13 ; extra == 'ipdb'
155
156
  Requires-Dist: ipython ==7.34.0 ; extra == 'ipdb'
@@ -159,7 +160,7 @@ Requires-Dist: pdfminer.six ==20221105 ; (python_version < "3.8") and extra == '
159
160
  Requires-Dist: cffi ==1.15.1 ; (python_version < "3.8") and extra == 'pdfminer'
160
161
  Requires-Dist: cryptography ==39.0.2 ; (python_version < "3.9") and extra == 'pdfminer'
161
162
  Requires-Dist: pdfminer.six ==20240706 ; (python_version >= "3.8") and extra == 'pdfminer'
162
- Requires-Dist: cffi ==1.16.0 ; (python_version >= "3.8") and extra == 'pdfminer'
163
+ Requires-Dist: cffi ==1.17.0 ; (python_version >= "3.8") and extra == 'pdfminer'
163
164
  Requires-Dist: cryptography ==43.0.0 ; (python_version >= "3.9") and extra == 'pdfminer'
164
165
  Provides-Extra: pillow
165
166
  Requires-Dist: Pillow ==9.5.0 ; (python_version < "3.8") and extra == 'pillow'
@@ -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=KYeZiO-sAGmmSCwDATE4J4yKhQbYx8tdPr3tM_XnvVg,46
8
+ seleniumbase/__version__.py,sha256=yvYG_kFQEo5aqUjDLxy4JLMbWHXAWYTX5_bqLcH8jXQ,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
@@ -29,7 +29,7 @@ seleniumbase/console_scripts/run.py,sha256=54XCmUvOtYT5UmajEZ208wflH5BLkEpHZSmvg
29
29
  seleniumbase/console_scripts/sb_behave_gui.py,sha256=8uFTnHU3lPsxAlPFbGe4tH4fVryEbQeVBydwJZw3e9c,15403
30
30
  seleniumbase/console_scripts/sb_caseplans.py,sha256=HrML5SU6E_3gC8Ae5byo5tnBidrs0sY3feJ8ug4cR4o,18415
31
31
  seleniumbase/console_scripts/sb_commander.py,sha256=FdRLcEe3xOnnbU1bZI4_1ZLu5eKdR4JuIh37j5M-J00,13585
32
- seleniumbase/console_scripts/sb_install.py,sha256=BCQqIUZrHpoRv7bXULzgrOnLCGEWmkZ45MrNIColOHI,45682
32
+ seleniumbase/console_scripts/sb_install.py,sha256=SZlJyN51SzQVR7WKquJtukOo3_h2mK00UMTkb0HEciQ,45682
33
33
  seleniumbase/console_scripts/sb_mkchart.py,sha256=QDDjA8N_Qy62Mgbe2fnSU8mhZbKTVyV9KJRKYz2Tf7Y,11232
34
34
  seleniumbase/console_scripts/sb_mkdir.py,sha256=-OJrGM3upjdhCQb00zxSapS7eVtE49K3bR6KzsGvBbM,30049
35
35
  seleniumbase/console_scripts/sb_mkfile.py,sha256=t2rxTZTz76RDeSbBdHLaHUDS6LT_p0ttm2H_uYdtBko,16480
@@ -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=uTqCrzQYOF98xQX6ruqWnhpudf1MKRGnqUxG8x7jZC8,194089
43
+ seleniumbase/core/browser_launcher.py,sha256=BlafNTZPrsqfNgS2Svi-OXL4VNeSGkemj73esHqlTow,195478
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
@@ -76,7 +76,7 @@ seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3
76
76
  seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
77
77
  seleniumbase/fixtures/js_utils.py,sha256=y1FgWvrg7CjryqGnFhbmFIIVYMzQfYZhwppYae87UCo,51158
78
78
  seleniumbase/fixtures/page_actions.py,sha256=_LBmIqKBdRlgrKnl6aKUcHbns1GC18_YNvuRniRv1V8,63066
79
- seleniumbase/fixtures/page_utils.py,sha256=QmAvTlT0j0ESf1IgvyXwHJapJakFM7QqBLXnHXgaeJw,12596
79
+ seleniumbase/fixtures/page_utils.py,sha256=VJmhImXorrrXqokFvbDMGBWODLa9bHiaviHAO0r_0W0,12907
80
80
  seleniumbase/fixtures/shared_utils.py,sha256=Fc78v0OxfLPOPqeT8ExsdkTgXHlmpxvJeLbLyDnu1dI,5748
81
81
  seleniumbase/fixtures/unittest_helper.py,sha256=sfZ92rZeBAn_sF_yQ3I6_I7h3lyU5-cV_UMegBNoEm8,1294
82
82
  seleniumbase/fixtures/words.py,sha256=FOA4mAYvl3EPVpBTvgvK6YwCL8BdlRCmed685kEe7Vg,7827
@@ -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.29.6.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
141
- seleniumbase-4.29.6.dist-info/METADATA,sha256=4i6JA3oDE4ZAvCqao_GmlA3bbOfq8RueLJs6TlPWvro,85695
142
- seleniumbase-4.29.6.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
143
- seleniumbase-4.29.6.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
144
- seleniumbase-4.29.6.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
145
- seleniumbase-4.29.6.dist-info/RECORD,,
140
+ seleniumbase-4.29.8.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
141
+ seleniumbase-4.29.8.dist-info/METADATA,sha256=4tsAT_jWi2XExD3koW1AWCVoIa8lSBfL9lckU5zMeUc,85776
142
+ seleniumbase-4.29.8.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
143
+ seleniumbase-4.29.8.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
144
+ seleniumbase-4.29.8.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
145
+ seleniumbase-4.29.8.dist-info/RECORD,,