seleniumbase 4.42.2__py3-none-any.whl → 4.42.3__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.42.2"
2
+ __version__ = "4.42.3"
@@ -712,7 +712,10 @@ class CDPMethods():
712
712
  self.__slow_mode_pause_if_set()
713
713
  element = self.find_element(selector, timeout=timeout)
714
714
  element.scroll_into_view()
715
- element.click()
715
+ if element.tag_name == "div" or element.tag_name == "input":
716
+ element.mouse_click() # Simulated click (not PyAutoGUI)
717
+ else:
718
+ element.click()
716
719
  self.__slow_mode_pause_if_set()
717
720
  self.loop.run_until_complete(self.page.wait())
718
721
 
@@ -258,13 +258,13 @@ async def start(
258
258
  config: Optional[Config] = None,
259
259
  *,
260
260
  user_data_dir: Optional[PathLike] = None,
261
- headless: Optional[bool] = False,
262
- incognito: Optional[bool] = False,
263
- guest: Optional[bool] = False,
261
+ headless: Optional[bool] = None,
262
+ incognito: Optional[bool] = None,
263
+ guest: Optional[bool] = None,
264
264
  browser_executable_path: Optional[PathLike] = None,
265
265
  browser_args: Optional[List[str]] = None,
266
266
  xvfb_metrics: Optional[List[str]] = None, # "Width,Height" for Linux
267
- ad_block: Optional[bool] = False,
267
+ ad_block: Optional[bool] = None,
268
268
  sandbox: Optional[bool] = True,
269
269
  lang: Optional[str] = None, # Set the Language Locale Code
270
270
  host: Optional[str] = None, # Chrome remote-debugging-host
@@ -318,6 +318,210 @@ async def start(
318
318
  (For example, ensuring shadow-root is always in "open" mode.)
319
319
  :type expert: bool
320
320
  """
321
+ sys_argv = sys.argv
322
+ arg_join = " ".join(sys_argv)
323
+ if headless is None:
324
+ if "--headless" in sys_argv:
325
+ headless = True
326
+ else:
327
+ headless = False
328
+ if headed is None:
329
+ if "--gui" in sys_argv or "--headed" in sys_argv:
330
+ headed = True
331
+ else:
332
+ headed = False
333
+ if xvfb is None:
334
+ if "--xvfb" in sys_argv:
335
+ xvfb = True
336
+ else:
337
+ xvfb = False
338
+ if incognito is None:
339
+ if "--incognito" in sys_argv:
340
+ incognito = True
341
+ else:
342
+ incognito = False
343
+ if guest is None:
344
+ if "--guest" in sys_argv:
345
+ guest = True
346
+ else:
347
+ guest = False
348
+ if ad_block is None:
349
+ if "--ad-block" in sys_argv or "--ad_block" in sys_argv:
350
+ ad_block = True
351
+ else:
352
+ ad_block = False
353
+ if xvfb_metrics is None and "--xvfb-metrics" in arg_join:
354
+ x_m = xvfb_metrics
355
+ count = 0
356
+ for arg in sys_argv:
357
+ if arg.startswith("--xvfb-metrics="):
358
+ x_m = arg.split("--xvfb-metrics=")[1]
359
+ break
360
+ elif arg == "--xvfb-metrics" and len(sys_argv) > count + 1:
361
+ x_m = sys_argv[count + 1]
362
+ if x_m.startswith("-"):
363
+ x_m = None
364
+ break
365
+ count += 1
366
+ if x_m:
367
+ if x_m.startswith('"') and x_m.endswith('"'):
368
+ x_m = x_m[1:-1]
369
+ elif x_m.startswith("'") and x_m.endswith("'"):
370
+ x_m = x_m[1:-1]
371
+ xvfb_metrics = x_m
372
+ if agent is None and "user_agent" not in kwargs and "--agent" in arg_join:
373
+ count = 0
374
+ for arg in sys_argv:
375
+ if arg.startswith("--agent="):
376
+ agent = arg.split("--agent=")[1]
377
+ break
378
+ elif arg == "--agent" and len(sys_argv) > count + 1:
379
+ agent = sys_argv[count + 1]
380
+ if agent.startswith("-"):
381
+ agent = None
382
+ break
383
+ count += 1
384
+ if agent:
385
+ if agent.startswith('"') and agent.endswith('"'):
386
+ agent = agent[1:-1]
387
+ elif agent.startswith("'") and agent.endswith("'"):
388
+ agent = agent[1:-1]
389
+ if (
390
+ geoloc is None
391
+ and "geolocation" not in kwargs
392
+ and "--geolocation" in arg_join
393
+ ):
394
+ count = 0
395
+ for arg in sys_argv:
396
+ if arg.startswith("--geolocation="):
397
+ geoloc = arg.split("--geolocation=")[1]
398
+ break
399
+ elif arg == "--geolocation" and len(sys_argv) > count + 1:
400
+ geoloc = sys_argv[count + 1]
401
+ if geoloc.startswith("-"):
402
+ geoloc = None
403
+ break
404
+ count += 1
405
+ if geoloc:
406
+ if geoloc.startswith('"') and geoloc.endswith('"'):
407
+ geoloc = geoloc[1:-1]
408
+ elif geoloc.startswith("'") and geoloc.endswith("'"):
409
+ geoloc = geoloc[1:-1]
410
+ if geoloc:
411
+ import ast
412
+ geoloc = ast.literal_eval(geoloc)
413
+ if not lang and "locale" not in kwargs and "locale_code" not in kwargs:
414
+ if "--locale" in arg_join:
415
+ count = 0
416
+ for arg in sys_argv:
417
+ if arg.startswith("--locale="):
418
+ lang = arg.split("--locale=")[1]
419
+ break
420
+ elif arg == "--locale" and len(sys_argv) > count + 1:
421
+ lang = sys_argv[count + 1]
422
+ if lang.startswith("-"):
423
+ lang = None
424
+ break
425
+ count += 1
426
+ elif "--lang" in arg_join:
427
+ count = 0
428
+ for arg in sys_argv:
429
+ if arg.startswith("--lang="):
430
+ lang = arg.split("--lang=")[1]
431
+ break
432
+ elif arg == "--lang" and len(sys_argv) > count + 1:
433
+ lang = sys_argv[count + 1]
434
+ if lang.startswith("-"):
435
+ lang = None
436
+ break
437
+ count += 1
438
+ if lang:
439
+ if lang.startswith('"') and lang.endswith('"'):
440
+ lang = lang[1:-1]
441
+ elif lang.startswith("'") and lang.endswith("'"):
442
+ lang = lang[1:-1]
443
+ if not browser_executable_path and "binary_location" not in kwargs:
444
+ bin_loc = None
445
+ if "--binary-location" in arg_join or "--binary_location" in arg_join:
446
+ bin_loc_cmd = "--binary-location"
447
+ if "--binary_location" in arg_join:
448
+ bin_loc_cmd = "--binary_location"
449
+ count = 0
450
+ bin_loc = None
451
+ for arg in sys_argv:
452
+ if arg.startswith("%s=" % bin_loc_cmd):
453
+ bin_loc = arg.split("%s=" % bin_loc_cmd)[1]
454
+ break
455
+ elif arg == bin_loc_cmd and len(sys_argv) > count + 1:
456
+ bin_loc = sys_argv[count + 1]
457
+ if bin_loc.startswith("-"):
458
+ bin_loc = None
459
+ break
460
+ count += 1
461
+ elif "--bl=" in arg_join:
462
+ count = 0
463
+ bin_loc = None
464
+ for arg in sys_argv:
465
+ if arg.startswith("--bl="):
466
+ bin_loc = arg.split("--bl=")[1]
467
+ break
468
+ count += 1
469
+ if bin_loc:
470
+ if bin_loc.startswith('"') and bin_loc.endswith('"'):
471
+ bin_loc = bin_loc[1:-1]
472
+ elif bin_loc.startswith("'") and bin_loc.endswith("'"):
473
+ bin_loc = bin_loc[1:-1]
474
+ if bin_loc and not os.path.exists(bin_loc):
475
+ print(" No browser executable at PATH {%s}! " % bin_loc)
476
+ print(" Using default Chrome browser instead!")
477
+ bin_loc = None
478
+ browser_executable_path = bin_loc
479
+ if proxy is None and "--proxy" in arg_join:
480
+ proxy_string = None
481
+ if "--proxy=" in arg_join:
482
+ proxy_string = arg_join.split("--proxy=")[1].split(" ")[0]
483
+ elif "--proxy " in arg_join:
484
+ proxy_string = arg_join.split("--proxy ")[1].split(" ")[0]
485
+ if proxy_string:
486
+ if proxy_string.startswith('"') and proxy_string.endswith('"'):
487
+ proxy_string = proxy_string[1:-1]
488
+ elif proxy_string.startswith("'") and proxy_string.endswith("'"):
489
+ proxy_string = proxy_string[1:-1]
490
+ proxy = proxy_string
491
+ if tzone is None and "timezone" not in kwargs and "--timezone" in arg_join:
492
+ tz_string = None
493
+ if "--timezone=" in arg_join:
494
+ tz_string = arg_join.split("--timezone=")[1].split(" ")[0]
495
+ elif "--timezone " in arg_join:
496
+ tz_string = arg_join.split("--timezone ")[1].split(" ")[0]
497
+ if tz_string:
498
+ if tz_string.startswith('"') and tz_string.endswith('"'):
499
+ tz_string = proxy_string[1:-1]
500
+ elif tz_string.startswith("'") and tz_string.endswith("'"):
501
+ tz_string = proxy_string[1:-1]
502
+ tzone = tz_string
503
+ platform_var = None
504
+ if (
505
+ "platform" not in kwargs
506
+ and "plat" not in kwargs
507
+ and "--platform" in arg_join
508
+ ):
509
+ count = 0
510
+ for arg in sys_argv:
511
+ if arg.startswith("--platform="):
512
+ platform_var = arg.split("--platform=")[1]
513
+ break
514
+ elif arg == "--platform" and len(sys_argv) > count + 1:
515
+ platform_var = sys_argv[count + 1]
516
+ if platform_var.startswith("-"):
517
+ platform_var = None
518
+ break
519
+ count += 1
520
+ if platform_var:
521
+ if platform_var.startswith('"') and platform_var.endswith('"'):
522
+ platform_var = platform_var[1:-1]
523
+ elif platform_var.startswith("'") and platform_var.endswith("'"):
524
+ platform_var = platform_var[1:-1]
321
525
  if IS_LINUX and not headless and not headed and not xvfb:
322
526
  xvfb = True # The default setting on Linux
323
527
  __activate_virtual_display_as_needed(headless, headed, xvfb, xvfb_metrics)
@@ -404,6 +608,8 @@ async def start(
404
608
  sb_config._cdp_platform = kwargs["platform"]
405
609
  elif "plat" in kwargs:
406
610
  sb_config._cdp_platform = kwargs["plat"]
611
+ elif platform_var:
612
+ sb_config._cdp_platform = platform_var
407
613
  else:
408
614
  sb_config._cdp_platform = None
409
615
  return driver
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seleniumbase
3
- Version: 4.42.2
3
+ Version: 4.42.3
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
@@ -28,7 +28,6 @@ Classifier: Environment :: Web Environment
28
28
  Classifier: Framework :: Pytest
29
29
  Classifier: Intended Audience :: Developers
30
30
  Classifier: Intended Audience :: Information Technology
31
- Classifier: License :: OSI Approved :: MIT License
32
31
  Classifier: Operating System :: MacOS :: MacOS X
33
32
  Classifier: Operating System :: Microsoft :: Windows
34
33
  Classifier: Operating System :: POSIX :: Linux
@@ -108,7 +107,8 @@ Requires-Dist: trio==0.27.0; python_version < "3.9"
108
107
  Requires-Dist: trio<1,>=0.31.0; python_version >= "3.9"
109
108
  Requires-Dist: trio-websocket~=0.12.2
110
109
  Requires-Dist: wsproto==1.2.0
111
- Requires-Dist: websocket-client~=1.8.0
110
+ Requires-Dist: websocket-client~=1.8.0; python_version < "3.9"
111
+ Requires-Dist: websocket-client~=1.9.0; python_version >= "3.9"
112
112
  Requires-Dist: selenium==4.27.1; python_version < "3.9"
113
113
  Requires-Dist: selenium==4.32.0; python_version >= "3.9" and python_version < "3.10"
114
114
  Requires-Dist: selenium==4.36.0; python_version >= "3.10"
@@ -135,6 +135,7 @@ Requires-Dist: soupsieve~=2.8; python_version >= "3.9"
135
135
  Requires-Dist: beautifulsoup4~=4.14.2
136
136
  Requires-Dist: pyotp==2.9.0
137
137
  Requires-Dist: python-xlib==0.33; platform_system == "Linux"
138
+ Requires-Dist: PyAutoGUI>=0.9.54; platform_system == "Linux"
138
139
  Requires-Dist: markdown-it-py==3.0.0; python_version < "3.10"
139
140
  Requires-Dist: markdown-it-py==4.0.0; python_version >= "3.10"
140
141
  Requires-Dist: mdurl==0.1.2
@@ -181,12 +182,12 @@ Requires-Dist: proxy.py==2.4.3; extra == "proxy"
181
182
  Provides-Extra: psutil
182
183
  Requires-Dist: psutil==7.1.0; extra == "psutil"
183
184
  Provides-Extra: pyautogui
184
- Requires-Dist: PyAutoGUI==0.9.54; extra == "pyautogui"
185
+ Requires-Dist: PyAutoGUI>=0.9.54; platform_system != "Linux" and extra == "pyautogui"
185
186
  Provides-Extra: selenium-stealth
186
187
  Requires-Dist: selenium-stealth==1.0.6; extra == "selenium-stealth"
187
188
  Provides-Extra: selenium-wire
188
189
  Requires-Dist: selenium-wire==5.1.0; extra == "selenium-wire"
189
- Requires-Dist: pyOpenSSL==24.2.1; extra == "selenium-wire"
190
+ Requires-Dist: pyOpenSSL>=24.2.1; extra == "selenium-wire"
190
191
  Requires-Dist: pyparsing>=3.1.4; extra == "selenium-wire"
191
192
  Requires-Dist: Brotli==1.1.0; extra == "selenium-wire"
192
193
  Requires-Dist: blinker==1.7.0; extra == "selenium-wire"
@@ -195,7 +196,7 @@ Requires-Dist: hpack==4.0.0; extra == "selenium-wire"
195
196
  Requires-Dist: hyperframe==6.0.1; extra == "selenium-wire"
196
197
  Requires-Dist: kaitaistruct==0.10; extra == "selenium-wire"
197
198
  Requires-Dist: pyasn1==0.6.1; extra == "selenium-wire"
198
- Requires-Dist: zstandard==0.23.0; extra == "selenium-wire"
199
+ Requires-Dist: zstandard>=0.23.0; extra == "selenium-wire"
199
200
  Dynamic: author
200
201
  Dynamic: author-email
201
202
  Dynamic: classifier
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
3
3
  sbase/steps.py,sha256=wiPSWZhFpBlWvkqXRJ18btpBu3nQaw9K5AzIJNAX5RM,43521
4
4
  seleniumbase/__init__.py,sha256=JFEY9P5QJqsa1M6ghzLMH2eIPQyh85iglCaQwg8Y8z4,2498
5
5
  seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
6
- seleniumbase/__version__.py,sha256=D-x04vu1avONcSptQWlUuesL4NzOg2d31LGNN5IxeSY,46
6
+ seleniumbase/__version__.py,sha256=NxDRTsK1en5AnzYTB768P_f5d5U9tzqllrffTcSIHfY,46
7
7
  seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  seleniumbase/behave/behave_helper.py,sha256=lJtagtivSbEpbRj0EKV4l4PuPU6NANONJJAnYwgVCe0,24379
9
9
  seleniumbase/behave/behave_sb.py,sha256=guLihFsr1uJ4v2AR3r3Vy_BTeHrHwy2JEJxhp-MVnZA,59872
@@ -50,7 +50,7 @@ seleniumbase/core/proxy_helper.py,sha256=pZ1NboNfziHU3vWZLOZLX-qkfM3oKSnpc3omQf9
50
50
  seleniumbase/core/recorder_helper.py,sha256=gDION28OK4NAYsE-7ohKZ9Z3sxQQ0FEjf859LDpqsg4,25320
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=4mnJxEtzxEFrr1ZFQ8HwXt9Mz5uB0qteeKl1oyYJ3Ms,104395
53
+ seleniumbase/core/sb_cdp.py,sha256=E_7sbQjyqDAO38IiGYSSB57xrTqxAi8nnqUEWIAXYt8,104551
54
54
  seleniumbase/core/sb_driver.py,sha256=-IQsskc7HpXQbcBL04IPjmGpyYchyo7v9OPF2WcahDw,14159
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
@@ -118,7 +118,7 @@ seleniumbase/undetected/webelement.py,sha256=OOpUYbEiOG52KsYYyuDW9tYLdA2SMnukvwQ
118
118
  seleniumbase/undetected/cdp_driver/__init__.py,sha256=Ga9alwuaZZy4_XOShc0HjgFnNqpPdrcbjAicz5gE7a4,215
119
119
  seleniumbase/undetected/cdp_driver/_contradict.py,sha256=lP4b0h5quAy573ETn_TBbYV889cL1AuPLVInpJ0ZkiU,3183
120
120
  seleniumbase/undetected/cdp_driver/browser.py,sha256=JQlwMuwZgK0vWlvH4SU6DA7LcZo2I4hJRUIcv4gbZCQ,35609
121
- seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=ku3Nq8yjC6kbvVV2PB149E-TxQIIvjHDFQI2wyi0HVs,25221
121
+ seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=83NOk962PCiERr6YQ_QjTS5yS8Uwcnsyaw9BdgnGoAQ,33481
122
122
  seleniumbase/undetected/cdp_driver/config.py,sha256=pjcGq0azNQpNb3XT2sTjxShLEmcIPdzTzB_mitu6GkM,13557
123
123
  seleniumbase/undetected/cdp_driver/connection.py,sha256=WgZ4QamXSdTzP4Xfgkn8mxv-JFivMG6hqbyHy2_LQlg,25717
124
124
  seleniumbase/undetected/cdp_driver/element.py,sha256=FIC6v7OmumLCT-_vIc3H4oju_oBbaLpWJUJIKm2c_q4,40467
@@ -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.42.2.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
141
- seleniumbase-4.42.2.dist-info/METADATA,sha256=L83V4d3asXvqRC4zWcvT0OhPwDhrS27A4-m3AC_PHyk,89175
142
- seleniumbase-4.42.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
143
- seleniumbase-4.42.2.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
144
- seleniumbase-4.42.2.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
145
- seleniumbase-4.42.2.dist-info/RECORD,,
140
+ seleniumbase-4.42.3.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
141
+ seleniumbase-4.42.3.dist-info/METADATA,sha256=spZZe0MvPKyG3c0xO1JF1Dp_dKNSthItrviEXMnMmss,89304
142
+ seleniumbase-4.42.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
143
+ seleniumbase-4.42.3.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
144
+ seleniumbase-4.42.3.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
145
+ seleniumbase-4.42.3.dist-info/RECORD,,