seleniumbase 4.22.5__py3-none-any.whl → 4.23.0__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.22.5"
2
+ __version__ = "4.23.0"
@@ -226,6 +226,7 @@ def get_configured_sb(context):
226
226
  sb.chromium_arg = None
227
227
  sb.firefox_arg = None
228
228
  sb.firefox_pref = None
229
+ sb.disable_features = None
229
230
  sb.proxy_string = None
230
231
  sb.proxy_bypass_list = None
231
232
  sb.proxy_pac_url = None
@@ -748,6 +749,13 @@ def get_configured_sb(context):
748
749
  firefox_pref = sb.firefox_pref # revert to default
749
750
  sb.firefox_pref = firefox_pref
750
751
  continue
752
+ # Handle: -D disable-features="F1,F2" / disable_features="F1,F2"
753
+ if low_key in ["disable-features", "disable_features"]:
754
+ disable_features = userdata[key]
755
+ if disable_features == "true":
756
+ disable_features = sb.disable_features # revert to default
757
+ sb.disable_features = disable_features
758
+ continue
751
759
  # Handle: -D proxy=SERVER:PORT / proxy=USERNAME:PASSWORD@SERVER:PORT
752
760
  if low_key in ["proxy", "proxy-server", "proxy-string"]:
753
761
  proxy_string = userdata[key]
@@ -75,10 +75,11 @@ def show_basic_usage():
75
75
  seleniumbase_logo = logo_helper.get_seleniumbase_logo()
76
76
  print(seleniumbase_logo)
77
77
  print("")
78
- time.sleep(0.25) # Enough time to see the logo
78
+ time.sleep(0.28) # Enough time to see the logo
79
79
  show_package_location()
80
80
  show_version_info()
81
81
  print("")
82
+ time.sleep(0.72) # Enough time to see the version
82
83
  sc = ""
83
84
  sc += ' * USAGE: "seleniumbase [COMMAND] [PARAMETERS]"\n'
84
85
  sc += ' * OR: "sbase [COMMAND] [PARAMETERS]"\n'
@@ -763,6 +763,7 @@ def _set_chrome_options(
763
763
  user_data_dir,
764
764
  extension_zip,
765
765
  extension_dir,
766
+ disable_features,
766
767
  binary_location,
767
768
  driver_version,
768
769
  page_load_strategy,
@@ -1044,6 +1045,7 @@ def _set_chrome_options(
1044
1045
  binary_loc = detect_b_ver.get_binary_location(br_app, True)
1045
1046
  if os.path.exists(binary_loc):
1046
1047
  binary_location = binary_loc
1048
+ extra_disabled_features = []
1047
1049
  if chromium_arg:
1048
1050
  # Can be a comma-separated list of Chromium args
1049
1051
  chromium_arg_list = chromium_arg.split(",")
@@ -1069,8 +1071,13 @@ def _set_chrome_options(
1069
1071
  )
1070
1072
  if os.path.exists(binary_loc):
1071
1073
  binary_location = binary_loc
1074
+ elif "disable-features=" in chromium_arg_item:
1075
+ d_f = chromium_arg_item.split("disable-features=")[-1]
1076
+ extra_disabled_features.append(d_f)
1072
1077
  elif len(chromium_arg_item) >= 3:
1073
1078
  chrome_options.add_argument(chromium_arg_item)
1079
+ if disable_features:
1080
+ extra_disabled_features.extend(disable_features.split(","))
1074
1081
  if devtools and not headless:
1075
1082
  chrome_options.add_argument("--auto-open-devtools-for-tabs")
1076
1083
  if user_agent:
@@ -1089,19 +1096,36 @@ def _set_chrome_options(
1089
1096
  if headless or headless2 or is_using_uc(undetectable, browser_name):
1090
1097
  chrome_options.add_argument("--disable-renderer-backgrounding")
1091
1098
  chrome_options.add_argument("--disable-backgrounding-occluded-windows")
1099
+ chrome_options.add_argument("--disable-client-side-phishing-detection")
1100
+ chrome_options.add_argument("--disable-oopr-debug-crash-dump")
1101
+ chrome_options.add_argument("--disable-top-sites")
1092
1102
  chrome_options.add_argument("--ash-no-nudges")
1103
+ chrome_options.add_argument("--no-crash-upload")
1093
1104
  chrome_options.add_argument("--deny-permission-prompts")
1105
+ included_disabled_features = []
1094
1106
  if user_data_dir:
1095
- chrome_options.add_argument(
1096
- "--disable-features=OptimizationHintsFetching,Translate,"
1097
- "OptimizationTargetPrediction,PrivacySandboxSettings4,"
1098
- "DownloadBubble,DownloadBubbleV2"
1099
- )
1107
+ included_disabled_features.append("OptimizationHintsFetching")
1108
+ included_disabled_features.append("Translate")
1109
+ included_disabled_features.append("OptimizationTargetPrediction")
1110
+ included_disabled_features.append("PrivacySandboxSettings4")
1111
+ included_disabled_features.append("DownloadBubble")
1112
+ included_disabled_features.append("DownloadBubbleV2")
1113
+ for item in extra_disabled_features:
1114
+ if item not in included_disabled_features:
1115
+ included_disabled_features.append(item)
1116
+ d_f_string = ",".join(included_disabled_features)
1117
+ chrome_options.add_argument("--disable-features=%s" % d_f_string)
1100
1118
  else:
1101
- chrome_options.add_argument(
1102
- "--disable-features=OptimizationHintsFetching,Translate,"
1103
- "OptimizationTargetPrediction,DownloadBubble,DownloadBubbleV2"
1104
- )
1119
+ included_disabled_features.append("OptimizationHintsFetching")
1120
+ included_disabled_features.append("Translate")
1121
+ included_disabled_features.append("OptimizationTargetPrediction")
1122
+ included_disabled_features.append("DownloadBubble")
1123
+ included_disabled_features.append("DownloadBubbleV2")
1124
+ for item in extra_disabled_features:
1125
+ if item not in included_disabled_features:
1126
+ included_disabled_features.append(item)
1127
+ d_f_string = ",".join(included_disabled_features)
1128
+ chrome_options.add_argument("--disable-features=%s" % d_f_string)
1105
1129
  if (
1106
1130
  is_using_uc(undetectable, browser_name)
1107
1131
  and (
@@ -1338,6 +1362,7 @@ def get_driver(
1338
1362
  user_data_dir=None,
1339
1363
  extension_zip=None,
1340
1364
  extension_dir=None,
1365
+ disable_features=None,
1341
1366
  binary_location=None,
1342
1367
  driver_version=None,
1343
1368
  page_load_strategy=None,
@@ -1550,6 +1575,7 @@ def get_driver(
1550
1575
  user_data_dir,
1551
1576
  extension_zip,
1552
1577
  extension_dir,
1578
+ disable_features,
1553
1579
  binary_location,
1554
1580
  driver_version,
1555
1581
  page_load_strategy,
@@ -1605,6 +1631,7 @@ def get_driver(
1605
1631
  user_data_dir,
1606
1632
  extension_zip,
1607
1633
  extension_dir,
1634
+ disable_features,
1608
1635
  binary_location,
1609
1636
  driver_version,
1610
1637
  page_load_strategy,
@@ -1664,6 +1691,7 @@ def get_remote_driver(
1664
1691
  user_data_dir,
1665
1692
  extension_zip,
1666
1693
  extension_dir,
1694
+ disable_features,
1667
1695
  binary_location,
1668
1696
  driver_version,
1669
1697
  page_load_strategy,
@@ -1784,6 +1812,7 @@ def get_remote_driver(
1784
1812
  user_data_dir,
1785
1813
  extension_zip,
1786
1814
  extension_dir,
1815
+ disable_features,
1787
1816
  binary_location,
1788
1817
  driver_version,
1789
1818
  page_load_strategy,
@@ -1955,6 +1984,7 @@ def get_remote_driver(
1955
1984
  user_data_dir,
1956
1985
  extension_zip,
1957
1986
  extension_dir,
1987
+ disable_features,
1958
1988
  binary_location,
1959
1989
  driver_version,
1960
1990
  page_load_strategy,
@@ -2075,6 +2105,7 @@ def get_local_driver(
2075
2105
  user_data_dir,
2076
2106
  extension_zip,
2077
2107
  extension_dir,
2108
+ disable_features,
2078
2109
  binary_location,
2079
2110
  driver_version,
2080
2111
  page_load_strategy,
@@ -2570,18 +2601,6 @@ def get_local_driver(
2570
2601
  edge_options.add_argument(
2571
2602
  "--disable-autofill-keyboard-accessory-view[8]"
2572
2603
  )
2573
- edge_options.add_argument("--ash-no-nudges")
2574
- edge_options.add_argument("--deny-permission-prompts")
2575
- if user_data_dir:
2576
- edge_options.add_argument(
2577
- "--disable-features=OptimizationHintsFetching,Translate,"
2578
- "OptimizationTargetPrediction,PrivacySandboxSettings4"
2579
- )
2580
- else:
2581
- edge_options.add_argument(
2582
- "--disable-features=OptimizationHintsFetching,Translate,"
2583
- "OptimizationTargetPrediction"
2584
- )
2585
2604
  edge_options.add_argument("--disable-browser-side-navigation")
2586
2605
  edge_options.add_argument("--disable-translate")
2587
2606
  if not enable_ws:
@@ -2596,6 +2615,12 @@ def get_local_driver(
2596
2615
  if headless or headless2 or is_using_uc(undetectable, browser_name):
2597
2616
  edge_options.add_argument("--disable-renderer-backgrounding")
2598
2617
  edge_options.add_argument("--disable-backgrounding-occluded-windows")
2618
+ edge_options.add_argument("--disable-client-side-phishing-detection")
2619
+ edge_options.add_argument("--disable-oopr-debug-crash-dump")
2620
+ edge_options.add_argument("--disable-top-sites")
2621
+ edge_options.add_argument("--ash-no-nudges")
2622
+ edge_options.add_argument("--no-crash-upload")
2623
+ edge_options.add_argument("--deny-permission-prompts")
2599
2624
  if (
2600
2625
  page_load_strategy
2601
2626
  and page_load_strategy.lower() in ["eager", "none"]
@@ -2677,6 +2702,7 @@ def get_local_driver(
2677
2702
  edge_options.add_argument("--disable-gpu")
2678
2703
  if IS_LINUX:
2679
2704
  edge_options.add_argument("--disable-dev-shm-usage")
2705
+ extra_disabled_features = []
2680
2706
  set_binary = False
2681
2707
  if chromium_arg:
2682
2708
  # Can be a comma-separated list of Chromium args
@@ -2690,8 +2716,33 @@ def get_local_driver(
2690
2716
  chromium_arg_item = "--" + chromium_arg_item
2691
2717
  if "set-binary" in chromium_arg_item:
2692
2718
  set_binary = True
2719
+ elif "disable-features=" in chromium_arg_item:
2720
+ d_f = chromium_arg_item.split("disable-features=")[-1]
2721
+ extra_disabled_features.append(d_f)
2693
2722
  elif len(chromium_arg_item) >= 3:
2694
2723
  edge_options.add_argument(chromium_arg_item)
2724
+ if disable_features:
2725
+ extra_disabled_features.extend(disable_features.split(","))
2726
+ included_disabled_features = []
2727
+ if user_data_dir:
2728
+ included_disabled_features.append("OptimizationHintsFetching")
2729
+ included_disabled_features.append("Translate")
2730
+ included_disabled_features.append("OptimizationTargetPrediction")
2731
+ included_disabled_features.append("PrivacySandboxSettings4")
2732
+ for item in extra_disabled_features:
2733
+ if item not in included_disabled_features:
2734
+ included_disabled_features.append(item)
2735
+ d_f_string = ",".join(included_disabled_features)
2736
+ edge_options.add_argument("--disable-features=%s" % d_f_string)
2737
+ else:
2738
+ included_disabled_features.append("OptimizationHintsFetching")
2739
+ included_disabled_features.append("Translate")
2740
+ included_disabled_features.append("OptimizationTargetPrediction")
2741
+ for item in extra_disabled_features:
2742
+ if item not in included_disabled_features:
2743
+ included_disabled_features.append(item)
2744
+ d_f_string = ",".join(included_disabled_features)
2745
+ edge_options.add_argument("--disable-features=%s" % d_f_string)
2695
2746
  if (set_binary or IS_LINUX) and not binary_location:
2696
2747
  br_app = "edge"
2697
2748
  binary_loc = detect_b_ver.get_binary_location(br_app)
@@ -2831,6 +2882,7 @@ def get_local_driver(
2831
2882
  user_data_dir,
2832
2883
  extension_zip,
2833
2884
  extension_dir,
2885
+ disable_features,
2834
2886
  binary_location,
2835
2887
  driver_version,
2836
2888
  page_load_strategy,
@@ -3348,6 +3400,7 @@ def get_local_driver(
3348
3400
  None, # user_data_dir
3349
3401
  None, # extension_zip
3350
3402
  None, # extension_dir
3403
+ None, # disable_features
3351
3404
  binary_location,
3352
3405
  driver_version,
3353
3406
  page_load_strategy,
@@ -3565,6 +3618,7 @@ def get_local_driver(
3565
3618
  None, # user_data_dir
3566
3619
  None, # extension_zip
3567
3620
  None, # extension_dir
3621
+ None, # disable_features
3568
3622
  binary_location,
3569
3623
  driver_version,
3570
3624
  page_load_strategy,
@@ -3777,6 +3777,7 @@ class BaseCase(unittest.TestCase):
3777
3777
  user_data_dir=None,
3778
3778
  extension_zip=None,
3779
3779
  extension_dir=None,
3780
+ disable_features=None,
3780
3781
  binary_location=None,
3781
3782
  driver_version=None,
3782
3783
  page_load_strategy=None,
@@ -3835,6 +3836,7 @@ class BaseCase(unittest.TestCase):
3835
3836
  user_data_dir - Chrome's User Data Directory to use (Chrome-only)
3836
3837
  extension_zip - A Chrome Extension ZIP file to use (Chrome-only)
3837
3838
  extension_dir - A Chrome Extension folder to use (Chrome-only)
3839
+ disable_features - the option to disable features on Chrome/Edge
3838
3840
  binary_location - the path of the browser binary to use (Chromium)
3839
3841
  driver_version - the chromedriver or uc_driver version to force
3840
3842
  page_load_strategy - the option to change pageLoadStrategy (Chrome)
@@ -3960,6 +3962,8 @@ class BaseCase(unittest.TestCase):
3960
3962
  extension_zip = self.extension_zip
3961
3963
  if extension_dir is None:
3962
3964
  extension_dir = self.extension_dir
3965
+ if disable_features is None:
3966
+ disable_features = self.disable_features
3963
3967
  if binary_location is None:
3964
3968
  binary_location = self.binary_location
3965
3969
  if driver_version is None:
@@ -4040,6 +4044,7 @@ class BaseCase(unittest.TestCase):
4040
4044
  user_data_dir=user_data_dir,
4041
4045
  extension_zip=extension_zip,
4042
4046
  extension_dir=extension_dir,
4047
+ disable_features=disable_features,
4043
4048
  binary_location=binary_location,
4044
4049
  driver_version=driver_version,
4045
4050
  page_load_strategy=page_load_strategy,
@@ -14331,6 +14336,7 @@ class BaseCase(unittest.TestCase):
14331
14336
  self.user_data_dir = sb_config.user_data_dir
14332
14337
  self.extension_zip = sb_config.extension_zip
14333
14338
  self.extension_dir = sb_config.extension_dir
14339
+ self.disable_features = sb_config.disable_features
14334
14340
  self.binary_location = sb_config.binary_location
14335
14341
  self.driver_version = sb_config.driver_version
14336
14342
  self.page_load_strategy = sb_config.page_load_strategy
@@ -14652,6 +14658,7 @@ class BaseCase(unittest.TestCase):
14652
14658
  user_data_dir=self.user_data_dir,
14653
14659
  extension_zip=self.extension_zip,
14654
14660
  extension_dir=self.extension_dir,
14661
+ disable_features=self.disable_features,
14655
14662
  binary_location=self.binary_location,
14656
14663
  driver_version=self.driver_version,
14657
14664
  page_load_strategy=self.page_load_strategy,
@@ -108,6 +108,7 @@ def Driver(
108
108
  user_data_dir=None, # Set the Chrome user data directory to use.
109
109
  extension_zip=None, # Load a Chrome Extension .zip|.crx, comma-separated.
110
110
  extension_dir=None, # Load a Chrome Extension directory, comma-separated.
111
+ disable_features=None, # "F1,F2" (Disable Chrome features, ","-separated.)
111
112
  binary_location=None, # Set path of the Chromium browser binary to use.
112
113
  driver_version=None, # Set the chromedriver or uc_driver version to use.
113
114
  page_load_strategy=None, # Set Chrome PLS to "normal", "eager", or "none".
@@ -264,6 +265,30 @@ def Driver(
264
265
  proxy_string = proxy_string[1:-1]
265
266
  elif proxy_string.startswith("'") and proxy_string.endswith("'"):
266
267
  proxy_string = proxy_string[1:-1]
268
+ c_a = chromium_arg
269
+ if c_a is None and "--chromium-arg" in arg_join:
270
+ if "--chromium-arg=" in arg_join:
271
+ c_a = arg_join.split("--chromium-arg=")[1].split(" ")[0]
272
+ elif "--chromium-arg " in arg_join:
273
+ c_a = arg_join.split("--chromium-arg ")[1].split(" ")[0]
274
+ if c_a:
275
+ if c_a.startswith('"') and c_a.endswith('"'):
276
+ c_a = c_a[1:-1]
277
+ elif c_a.startswith("'") and c_a.endswith("'"):
278
+ c_a = c_a[1:-1]
279
+ chromium_arg = c_a
280
+ d_f = disable_features
281
+ if d_f is None and "--disable-features" in arg_join:
282
+ if "--disable-features=" in arg_join:
283
+ d_f = arg_join.split("--disable-features=")[1].split(" ")[0]
284
+ elif "--disable-features " in arg_join:
285
+ d_f = arg_join.split("--disable-features ")[1].split(" ")[0]
286
+ if d_f:
287
+ if d_f.startswith('"') and d_f.endswith('"'):
288
+ d_f = d_f[1:-1]
289
+ elif c_a.startswith("'") and d_f.endswith("'"):
290
+ d_f = d_f[1:-1]
291
+ disable_features = d_f
267
292
  user_agent = agent
268
293
  recorder_mode = False
269
294
  if recorder_ext:
@@ -505,6 +530,7 @@ def Driver(
505
530
  user_data_dir=user_data_dir,
506
531
  extension_zip=extension_zip,
507
532
  extension_dir=extension_dir,
533
+ disable_features=disable_features,
508
534
  binary_location=binary_location,
509
535
  driver_version=driver_version,
510
536
  page_load_strategy=page_load_strategy,
@@ -55,6 +55,7 @@ def pytest_addoption(parser):
55
55
  --firefox-pref=SET (Set a Firefox preference:value set, comma-separated.)
56
56
  --extension-zip=ZIP (Load a Chrome Extension .zip|.crx, comma-separated.)
57
57
  --extension-dir=DIR (Load a Chrome Extension directory, comma-separated.)
58
+ --disable-features="F1,F2" (Disable features, comma-separated, no spaces.)
58
59
  --binary-location=PATH (Set path of the Chromium browser binary to use.)
59
60
  --driver-version=VER (Set the chromedriver or uc_driver version to use.)
60
61
  --sjw (Skip JS Waits for readyState to be "complete" or Angular to load.)
@@ -199,6 +200,8 @@ def pytest_addoption(parser):
199
200
  constants.Environment.DEVELOP,
200
201
  constants.Environment.PRODUCTION,
201
202
  constants.Environment.PERFORMANCE,
203
+ constants.Environment.REPLICA,
204
+ constants.Environment.FEDRAMP,
202
205
  constants.Environment.OFFLINE,
203
206
  constants.Environment.ONLINE,
204
207
  constants.Environment.MASTER,
@@ -208,6 +211,7 @@ def pytest_addoption(parser):
208
211
  constants.Environment.ALPHA,
209
212
  constants.Environment.BETA,
210
213
  constants.Environment.DEMO,
214
+ constants.Environment.GDPR,
211
215
  constants.Environment.MAIN,
212
216
  constants.Environment.TEST,
213
217
  constants.Environment.GOV,
@@ -624,6 +628,16 @@ def pytest_addoption(parser):
624
628
  (Can also be a comma-separated list of directories.)
625
629
  Default: None.""",
626
630
  )
631
+ parser.addoption(
632
+ "--disable_features",
633
+ "--disable-features",
634
+ action="store",
635
+ dest="disable_features",
636
+ default=None,
637
+ help="""Disable Chromium features from Chrome/Edge browsers.
638
+ Format: A comma-separated list of Chromium features.
639
+ Default: None.""",
640
+ )
627
641
  parser.addoption(
628
642
  "--binary_location",
629
643
  "--binary-location",
@@ -1477,6 +1491,7 @@ def pytest_configure(config):
1477
1491
  sb_config.firefox_pref = config.getoption("firefox_pref")
1478
1492
  sb_config.extension_zip = config.getoption("extension_zip")
1479
1493
  sb_config.extension_dir = config.getoption("extension_dir")
1494
+ sb_config.disable_features = config.getoption("disable_features")
1480
1495
  sb_config.binary_location = config.getoption("binary_location")
1481
1496
  sb_config.driver_version = config.getoption("driver_version")
1482
1497
  sb_config.page_load_strategy = config.getoption("page_load_strategy")
@@ -72,6 +72,7 @@ def SB(
72
72
  user_data_dir=None, # Set the Chrome user data directory to use.
73
73
  extension_zip=None, # Load a Chrome Extension .zip|.crx, comma-separated.
74
74
  extension_dir=None, # Load a Chrome Extension directory, comma-separated.
75
+ disable_features=None, # "F1,F2" (Disable Chrome features, ","-separated.)
75
76
  binary_location=None, # Set path of the Chromium browser binary to use.
76
77
  driver_version=None, # Set the chromedriver or uc_driver version to use.
77
78
  skip_js_waits=None, # Skip JS Waits (readyState=="complete" and Angular).
@@ -325,6 +326,30 @@ def SB(
325
326
  proxy_string = proxy_string[1:-1]
326
327
  elif proxy_string.startswith("'") and proxy_string.endswith("'"):
327
328
  proxy_string = proxy_string[1:-1]
329
+ c_a = chromium_arg
330
+ if c_a is None and "--chromium-arg" in arg_join:
331
+ if "--chromium-arg=" in arg_join:
332
+ c_a = arg_join.split("--chromium-arg=")[1].split(" ")[0]
333
+ elif "--chromium-arg " in arg_join:
334
+ c_a = arg_join.split("--chromium-arg ")[1].split(" ")[0]
335
+ if c_a:
336
+ if c_a.startswith('"') and c_a.endswith('"'):
337
+ c_a = c_a[1:-1]
338
+ elif c_a.startswith("'") and c_a.endswith("'"):
339
+ c_a = c_a[1:-1]
340
+ chromium_arg = c_a
341
+ d_f = disable_features
342
+ if d_f is None and "--disable-features" in arg_join:
343
+ if "--disable-features=" in arg_join:
344
+ d_f = arg_join.split("--disable-features=")[1].split(" ")[0]
345
+ elif "--disable-features " in arg_join:
346
+ d_f = arg_join.split("--disable-features ")[1].split(" ")[0]
347
+ if d_f:
348
+ if d_f.startswith('"') and d_f.endswith('"'):
349
+ d_f = d_f[1:-1]
350
+ elif c_a.startswith("'") and d_f.endswith("'"):
351
+ d_f = d_f[1:-1]
352
+ disable_features = d_f
328
353
  user_agent = agent
329
354
  recorder_mode = False
330
355
  if recorder_ext:
@@ -731,6 +756,7 @@ def SB(
731
756
  sb_config.chromium_arg = chromium_arg
732
757
  sb_config.firefox_arg = firefox_arg
733
758
  sb_config.firefox_pref = firefox_pref
759
+ sb_config.disable_features = disable_features
734
760
  sb_config.proxy_string = proxy_string
735
761
  sb_config.proxy_bypass_list = proxy_bypass_list
736
762
  sb_config.proxy_pac_url = proxy_pac_url
@@ -833,6 +859,7 @@ def SB(
833
859
  sb.chromium_arg = sb_config.chromium_arg
834
860
  sb.firefox_arg = sb_config.firefox_arg
835
861
  sb.firefox_pref = sb_config.firefox_pref
862
+ sb.disable_features = sb_config.disable_features
836
863
  sb.proxy_string = sb_config.proxy_string
837
864
  sb.proxy_bypass_list = sb_config.proxy_bypass_list
838
865
  sb.proxy_pac_url = sb_config.proxy_pac_url
@@ -36,6 +36,7 @@ class SeleniumBrowser(Plugin):
36
36
  --firefox-pref=SET (Set a Firefox preference:value set, comma-separated.)
37
37
  --extension-zip=ZIP (Load a Chrome Extension .zip|.crx, comma-separated.)
38
38
  --extension-dir=DIR (Load a Chrome Extension directory, comma-separated.)
39
+ --disable-features="F1,F2" (Disable features, comma-separated, no spaces.)
39
40
  --binary-location=PATH (Set path of the Chromium browser binary to use.)
40
41
  --driver-version=VER (Set the chromedriver or uc_driver version to use.)
41
42
  --sjw (Skip JS Waits for readyState to be "complete" or Angular to load.)
@@ -365,6 +366,16 @@ class SeleniumBrowser(Plugin):
365
366
  (Can also be a comma-separated list of directories.)
366
367
  Default: None.""",
367
368
  )
369
+ parser.addoption(
370
+ "--disable_features",
371
+ "--disable-features",
372
+ action="store",
373
+ dest="disable_features",
374
+ default=None,
375
+ help="""Disable Chromium features from Chrome/Edge browsers.
376
+ Format: A comma-separated list of Chromium features.
377
+ Default: None.""",
378
+ )
368
379
  parser.addoption(
369
380
  "--binary_location",
370
381
  "--binary-location",
@@ -1089,6 +1100,7 @@ class SeleniumBrowser(Plugin):
1089
1100
  test.test.user_data_dir = self.options.user_data_dir
1090
1101
  test.test.extension_zip = self.options.extension_zip
1091
1102
  test.test.extension_dir = self.options.extension_dir
1103
+ test.test.disable_features = self.options.disable_features
1092
1104
  test.test.binary_location = self.options.binary_location
1093
1105
  test.test.driver_version = self.options.driver_version
1094
1106
  test.test.page_load_strategy = self.options.page_load_strategy
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: seleniumbase
3
- Version: 4.22.5
3
+ Version: 4.23.0
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
@@ -89,7 +89,7 @@ Requires-Dist: pytest-xdist ==3.5.0
89
89
  Requires-Dist: parameterized ==0.9.0
90
90
  Requires-Dist: sbvirtualdisplay ==1.3.0
91
91
  Requires-Dist: behave ==1.2.6
92
- Requires-Dist: beautifulsoup4 ==4.12.2
92
+ Requires-Dist: beautifulsoup4 ==4.12.3
93
93
  Requires-Dist: pygments ==2.17.2
94
94
  Requires-Dist: tabcompleter ==1.3.0
95
95
  Requires-Dist: pdbp ==1.5.0
@@ -112,9 +112,9 @@ Requires-Dist: urllib3 <2.2.0,>=1.26.18 ; python_version >= "3.10"
112
112
  Requires-Dist: setuptools >=69.0.3 ; python_version >= "3.8"
113
113
  Requires-Dist: filelock >=3.13.1 ; python_version >= "3.8"
114
114
  Requires-Dist: platformdirs >=4.1.0 ; python_version >= "3.8"
115
- Requires-Dist: trio ==0.23.2 ; python_version >= "3.8"
116
- Requires-Dist: selenium ==4.16.0 ; python_version >= "3.8"
117
- Requires-Dist: pluggy ==1.3.0 ; python_version >= "3.8"
115
+ Requires-Dist: trio ==0.24.0 ; python_version >= "3.8"
116
+ Requires-Dist: selenium ==4.17.2 ; python_version >= "3.8"
117
+ Requires-Dist: pluggy ==1.4.0 ; python_version >= "3.8"
118
118
  Requires-Dist: soupsieve ==2.5 ; python_version >= "3.8"
119
119
  Requires-Dist: markdown-it-py ==3.0.0 ; python_version >= "3.8"
120
120
  Provides-Extra: allure
@@ -130,8 +130,8 @@ Requires-Dist: mccabe ==0.7.0 ; extra == 'flake8'
130
130
  Requires-Dist: flake8 ==5.0.4 ; (python_version < "3.9") and extra == 'flake8'
131
131
  Requires-Dist: pyflakes ==2.5.0 ; (python_version < "3.9") and extra == 'flake8'
132
132
  Requires-Dist: pycodestyle ==2.9.1 ; (python_version < "3.9") and extra == 'flake8'
133
- Requires-Dist: flake8 ==6.1.0 ; (python_version >= "3.9") and extra == 'flake8'
134
- Requires-Dist: pyflakes ==3.1.0 ; (python_version >= "3.9") and extra == 'flake8'
133
+ Requires-Dist: flake8 ==7.0.0 ; (python_version >= "3.9") and extra == 'flake8'
134
+ Requires-Dist: pyflakes ==3.2.0 ; (python_version >= "3.9") and extra == 'flake8'
135
135
  Requires-Dist: pycodestyle ==2.11.1 ; (python_version >= "3.9") and extra == 'flake8'
136
136
  Provides-Extra: ipdb
137
137
  Requires-Dist: ipdb ==0.13.13 ; extra == 'ipdb'
@@ -143,12 +143,12 @@ Requires-Dist: cffi ==1.15.1 ; (python_version < "3.8") and extra == 'pdfminer'
143
143
  Requires-Dist: cryptography ==39.0.2 ; (python_version < "3.9") and extra == 'pdfminer'
144
144
  Requires-Dist: pdfminer.six ==20231228 ; (python_version >= "3.8") and extra == 'pdfminer'
145
145
  Requires-Dist: cffi ==1.16.0 ; (python_version >= "3.8") and extra == 'pdfminer'
146
- Requires-Dist: cryptography ==41.0.7 ; (python_version >= "3.9") and extra == 'pdfminer'
146
+ Requires-Dist: cryptography ==42.0.0 ; (python_version >= "3.9") and extra == 'pdfminer'
147
147
  Provides-Extra: pillow
148
148
  Requires-Dist: Pillow ==9.5.0 ; (python_version < "3.8") and extra == 'pillow'
149
149
  Requires-Dist: Pillow ==10.2.0 ; (python_version >= "3.8") and extra == 'pillow'
150
150
  Provides-Extra: psutil
151
- Requires-Dist: psutil ==5.9.6 ; extra == 'psutil'
151
+ Requires-Dist: psutil ==5.9.8 ; extra == 'psutil'
152
152
  Provides-Extra: selenium-stealth
153
153
  Requires-Dist: selenium-stealth ==1.0.6 ; extra == 'selenium-stealth'
154
154
  Provides-Extra: selenium-wire
@@ -820,6 +820,7 @@ pytest test_coffee_cart.py --trace
820
820
  --firefox-pref=SET # (Set a Firefox preference:value set, comma-separated.)
821
821
  --extension-zip=ZIP # (Load a Chrome Extension .zip|.crx, comma-separated.)
822
822
  --extension-dir=DIR # (Load a Chrome Extension directory, comma-separated.)
823
+ --disable-features="F1,F2" # (Disable features, comma-separated, no spaces.)
823
824
  --binary-location=PATH # (Set path of the Chromium browser binary to use.)
824
825
  --driver-version=VER # (Set the chromedriver or uc_driver version to use.)
825
826
  --sjw # (Skip JS Waits for readyState to be "complete" or Angular to load.)
@@ -1471,22 +1472,24 @@ self.click("a.analytics") # Clicks the generated button
1471
1472
 
1472
1473
  <h3>🔵 How to use deferred asserts:</h3>
1473
1474
 
1474
- <p>Let's say you want to verify multiple different elements on a web page in a single test, but you don't want the test to fail until you verified several elements at once so that you don't have to rerun the test to find more missing elements on the same page. That's where deferred asserts come in. Here's the example:</p>
1475
+ <p>Let's say you want to verify multiple different elements on a web page in a single test, but you don't want the test to fail until you verified several elements at once so that you don't have to rerun the test to find more missing elements on the same page. That's where deferred asserts come in. Here's an example:</p>
1475
1476
 
1476
1477
  ```python
1477
1478
  from seleniumbase import BaseCase
1478
1479
  BaseCase.main(__name__, __file__)
1479
1480
 
1480
- class MyTestClass(BaseCase):
1481
+ class DeferredAssertTests(BaseCase):
1481
1482
  def test_deferred_asserts(self):
1482
- self.open('https://xkcd.com/993/')
1483
- self.wait_for_element('#comic')
1483
+ self.open("https://xkcd.com/993/")
1484
+ self.wait_for_element("#comic")
1484
1485
  self.deferred_assert_element('img[alt="Brand Identity"]')
1485
1486
  self.deferred_assert_element('img[alt="Rocket Ship"]') # Will Fail
1486
- self.deferred_assert_element('#comicmap')
1487
- self.deferred_assert_text('Fake Item', '#middleContainer') # Will Fail
1488
- self.deferred_assert_text('Random', '#middleContainer')
1487
+ self.deferred_assert_element("#comicmap")
1488
+ self.deferred_assert_text("Fake Item", "ul.comicNav") # Will Fail
1489
+ self.deferred_assert_text("Random", "ul.comicNav")
1489
1490
  self.deferred_assert_element('a[name="Super Fake !!!"]') # Will Fail
1491
+ self.deferred_assert_exact_text("Brand Identity", "#ctitle")
1492
+ self.deferred_assert_exact_text("Fake Food", "#comic") # Will Fail
1490
1493
  self.process_deferred_asserts()
1491
1494
  ```
1492
1495
 
@@ -5,10 +5,10 @@ sbase/steps.py,sha256=bKT_u5bJkKzYWEuAXi9NVVRYYxQRCM1_YJUrNFFRVPY,42865
5
5
  seleniumbase/ReadMe.md,sha256=5Bnv8gsyKQGABhLj0S4HXZdtVic98puQlIGYc7YHUm8,3612
6
6
  seleniumbase/__init__.py,sha256=Mw4ShIWUF2Efjx-JuwUQLWF9nIbxcX-vu9AOGBp32ec,2123
7
7
  seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
8
- seleniumbase/__version__.py,sha256=wr8rXcfNVFhE2e0JzuJzPTKboCMRUdkbgsUMts2V21E,46
8
+ seleniumbase/__version__.py,sha256=DzUsnScCsehfP07SyuVCgY7kh9b4smIG9s2jcwNl-8M,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
- seleniumbase/behave/behave_sb.py,sha256=JhEsKHK1SXR9pNalJahqUfax_frWzfKUF4MVXKwbhZA,55879
11
+ seleniumbase/behave/behave_sb.py,sha256=fy1yz96ED-M0cgfGp0jZlxNVegPYnLRJWj7lBSGMKlQ,56283
12
12
  seleniumbase/behave/steps.py,sha256=8-N-NB2tnDsxaP4LSg-uSBgbwZYMS6ZEL1oggO1PCoU,390
13
13
  seleniumbase/common/ReadMe.md,sha256=PwQsRSPRCXejL-fg4YyDzED_Yr6e7ddmGu3g2OcDrcQ,3286
14
14
  seleniumbase/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -25,7 +25,7 @@ seleniumbase/console_scripts/ReadMe.md,sha256=YVnRDa4tUfUWb1fRxKLrzK1Rw0Idcpi1Pe
25
25
  seleniumbase/console_scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  seleniumbase/console_scripts/logo_helper.py,sha256=F8pcANlWY6pdcMwHUdjjpjAD9i8XD0R5J-28eSh7QMM,1907
27
27
  seleniumbase/console_scripts/rich_helper.py,sha256=U_zvXpalxVV8rtg8c8EnNNmnh45tii3AV5ZV3O3KbGA,2234
28
- seleniumbase/console_scripts/run.py,sha256=Rm0VcijWUGVDFNEFZ7Iud_XUTtwDCqhG6T9b9dj_LkU,58174
28
+ seleniumbase/console_scripts/run.py,sha256=KHmbWk98_urdehNs1s8yN0sKqLUdF3hEBqlE0nn3nAQ,58229
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
@@ -40,7 +40,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=bFXBFusrKZ0v2OwCVgTiHvDCi17HdJYA
40
40
  seleniumbase/console_scripts/sb_recorder.py,sha256=2QQov64Erfnm1hnVleKX-c_llcsO6hhJKKxzcANcix0,10904
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=VfHCkddCtIBVqVccFzTdyV5MFL7adYN8DsvCUPe9q0w,159074
43
+ seleniumbase/core/browser_launcher.py,sha256=8cSA_s1p9AeJ5WyFtvFRM_kTU79eRtWjRkI2Cqljru8,162266
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=OwrA8rmLHBq1jWsehw7rAy_EcwYVQkmtPW_RKjNtmW0,11896
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=598cpkcLaWw3NpURyIujvcae-X9l3nP7OIE5FH6tlcM,687134
73
+ seleniumbase/fixtures/base_case.py,sha256=Bu84m9atQzyw5fNtuJ2UcXOLFnhc74Pjw2xhcYHmemE,687494
74
74
  seleniumbase/fixtures/constants.py,sha256=o7gQVKt0nZoR4r0tRwkfWYiCxjEDG9e7D6EEEXG141I,13254
75
75
  seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
76
76
  seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
@@ -92,13 +92,13 @@ seleniumbase/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
92
92
  seleniumbase/plugins/base_plugin.py,sha256=vwvjF3Ws_q6dQaQxlO9GVpbSASxLtNlB5SV1m30Q32U,14962
93
93
  seleniumbase/plugins/basic_test_info.py,sha256=8ov6n417gPbqqvrlT4zrch7l2XcRt-GF2ny6rR9AMWk,2108
94
94
  seleniumbase/plugins/db_reporting_plugin.py,sha256=En09qUCoojrk9-vbcnsoHdSELoGmag2GDIyu3jTiJas,7331
95
- seleniumbase/plugins/driver_manager.py,sha256=L74pIYgj2vzCQ8uAOfwQEcE5FlruaVCE9bSY1tjv6a4,19401
95
+ seleniumbase/plugins/driver_manager.py,sha256=vFVOIbPgt1Jo6Hk3uIxQuJXu5hBsfosE1rdlKd2LIn0,20594
96
96
  seleniumbase/plugins/page_source.py,sha256=loTnXxOj4kxEukuTZEiGyvKBhY3KDVDMnNlHHheTBDE,1889
97
- seleniumbase/plugins/pytest_plugin.py,sha256=Aq-D91t5bo9yOW9vVUVaRxtmo-KXCE86_g0v2RpCWTM,93461
97
+ seleniumbase/plugins/pytest_plugin.py,sha256=zoo3muEUfCIMS96mcsPpvxRHRvL2MoM1G-e_JjIr3Vk,94076
98
98
  seleniumbase/plugins/s3_logging_plugin.py,sha256=WDfertQgGOW_SRJpFMaekYD6vBVW9VO62POtXXy2HCM,2319
99
- seleniumbase/plugins/sb_manager.py,sha256=9BBcT49b8sk99TxcOgV17JGynhPjiS5-PauJWyWGaUc,38325
99
+ seleniumbase/plugins/sb_manager.py,sha256=Wl6XAMYmSOlchq6Ab76pD56kDap9ZMQcSp7ecb80d6w,39578
100
100
  seleniumbase/plugins/screen_shots.py,sha256=1hrXw-hzuZ1BR6Yh7AyWX2ABnvnP73-RCbwdz958gj4,1127
101
- seleniumbase/plugins/selenium_plugin.py,sha256=UDhT4TFcnGRg_43pzvsgDm6WpUcLfHs-EyUBEbYWcc4,53967
101
+ seleniumbase/plugins/selenium_plugin.py,sha256=wErmsKOzBFd9lDX9VVmxPauSpdjBDWScDk74QsCzJOY,54493
102
102
  seleniumbase/resources/ReadMe.md,sha256=uminnO5_Uv-UZDKcc9a9s9kxisaYUps-H98Fp5PJcaU,2124
103
103
  seleniumbase/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
104
104
  seleniumbase/resources/favicon.ico,sha256=QPf_YK0QXa_--C4_CH-odh6OTHRQ9k-4O6WcCpXSdwM,1150
@@ -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.22.5.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
141
- seleniumbase-4.22.5.dist-info/METADATA,sha256=LUwErq3DXGEdVIeaL5Q5_9A7TSmQHtpopWBrxLlSP90,84175
142
- seleniumbase-4.22.5.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
143
- seleniumbase-4.22.5.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
144
- seleniumbase-4.22.5.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
145
- seleniumbase-4.22.5.dist-info/RECORD,,
140
+ seleniumbase-4.23.0.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
141
+ seleniumbase-4.23.0.dist-info/METADATA,sha256=hVS4zEmB37dgkK8OD6spVZAqH8xCdTIWbTloY2UEISU,84395
142
+ seleniumbase-4.23.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
143
+ seleniumbase-4.23.0.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
144
+ seleniumbase-4.23.0.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
145
+ seleniumbase-4.23.0.dist-info/RECORD,,