seleniumbase 4.31.3__py3-none-any.whl → 4.31.5__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. seleniumbase/__init__.py +14 -6
  2. seleniumbase/__version__.py +1 -1
  3. seleniumbase/behave/behave_sb.py +4 -12
  4. seleniumbase/console_scripts/logo_helper.py +0 -8
  5. seleniumbase/console_scripts/run.py +330 -341
  6. seleniumbase/console_scripts/sb_behave_gui.py +0 -7
  7. seleniumbase/console_scripts/sb_caseplans.py +0 -7
  8. seleniumbase/console_scripts/sb_commander.py +0 -7
  9. seleniumbase/console_scripts/sb_install.py +47 -47
  10. seleniumbase/console_scripts/sb_mkchart.py +13 -20
  11. seleniumbase/console_scripts/sb_mkdir.py +9 -16
  12. seleniumbase/console_scripts/sb_mkfile.py +27 -34
  13. seleniumbase/console_scripts/sb_mkpres.py +13 -20
  14. seleniumbase/console_scripts/sb_mkrec.py +12 -19
  15. seleniumbase/console_scripts/sb_objectify.py +30 -30
  16. seleniumbase/console_scripts/sb_print.py +5 -12
  17. seleniumbase/console_scripts/sb_recorder.py +0 -7
  18. seleniumbase/fixtures/base_case.py +6 -8
  19. seleniumbase/plugins/driver_manager.py +17 -1
  20. seleniumbase/plugins/pytest_plugin.py +1 -8
  21. seleniumbase/plugins/sb_manager.py +19 -7
  22. seleniumbase/plugins/selenium_plugin.py +1 -0
  23. seleniumbase/translate/translator.py +0 -7
  24. {seleniumbase-4.31.3.dist-info → seleniumbase-4.31.5.dist-info}/METADATA +3 -3
  25. {seleniumbase-4.31.3.dist-info → seleniumbase-4.31.5.dist-info}/RECORD +29 -29
  26. {seleniumbase-4.31.3.dist-info → seleniumbase-4.31.5.dist-info}/LICENSE +0 -0
  27. {seleniumbase-4.31.3.dist-info → seleniumbase-4.31.5.dist-info}/WHEEL +0 -0
  28. {seleniumbase-4.31.3.dist-info → seleniumbase-4.31.5.dist-info}/entry_points.txt +0 -0
  29. {seleniumbase-4.31.3.dist-info → seleniumbase-4.31.5.dist-info}/top_level.txt +0 -0
seleniumbase/__init__.py CHANGED
@@ -1,21 +1,18 @@
1
1
  import collections
2
2
  import os
3
3
  import pdb
4
- try:
5
- import pdbp # (Pdb+) --- Python Debugger Plus
6
- except Exception:
7
- pass
8
4
  import sys
5
+ from contextlib import suppress
9
6
  from selenium import webdriver
10
7
  from seleniumbase.__version__ import __version__
11
8
  from seleniumbase.common import decorators # noqa
12
9
  from seleniumbase.common import encryption # noqa
13
- from seleniumbase.core import colored_traceback # noqa
10
+ from seleniumbase.core import colored_traceback
14
11
  from seleniumbase.core.browser_launcher import get_driver # noqa
15
12
  from seleniumbase.fixtures import js_utils # noqa
16
13
  from seleniumbase.fixtures import page_actions # noqa
17
14
  from seleniumbase.fixtures import page_utils # noqa
18
- from seleniumbase.fixtures import shared_utils # noqa
15
+ from seleniumbase.fixtures import shared_utils
19
16
  from seleniumbase.fixtures.base_case import BaseCase # noqa
20
17
  from seleniumbase.masterqa.master_qa import MasterQA # noqa
21
18
  from seleniumbase.plugins.sb_manager import SB # noqa
@@ -23,6 +20,17 @@ from seleniumbase.plugins.driver_manager import Driver # noqa
23
20
  from seleniumbase.plugins.driver_manager import DriverContext # noqa
24
21
  from seleniumbase import translate # noqa
25
22
 
23
+ with suppress(Exception):
24
+ import colorama
25
+ import pdbp # (Pdb+) --- Python Debugger Plus
26
+
27
+ is_windows = shared_utils.is_windows()
28
+ with suppress(Exception):
29
+ if is_windows and hasattr(colorama, "just_fix_windows_console"):
30
+ colorama.just_fix_windows_console()
31
+ elif not shared_utils.is_linux():
32
+ colorama.init(autoreset=True)
33
+
26
34
  if sys.version_info[0] < 3 and "pdbp" in locals():
27
35
  # With Python3, "import pdbp" is all you need
28
36
  for key in pdbp.__dict__.keys():
@@ -1,2 +1,2 @@
1
1
  # seleniumbase package
2
- __version__ = "4.31.3"
2
+ __version__ = "4.31.5"
@@ -545,12 +545,12 @@ def get_configured_sb(context):
545
545
  if low_key in ["disable-js", "disable_js"]:
546
546
  sb.disable_js = True
547
547
  continue
548
- # Handle: -D disable-csp / disable_csp
549
- if low_key in ["disable-csp", "disable_csp"]:
548
+ # Handle: -D disable-csp / disable_csp / dcsp
549
+ if low_key in ["disable-csp", "disable_csp", "dcsp"]:
550
550
  sb.disable_csp = True
551
551
  continue
552
- # Handle: -D disable-ws / disable_ws
553
- if low_key in ["disable-ws", "disable_ws"]:
552
+ # Handle: -D disable-ws / disable_ws / dws
553
+ if low_key in ["disable-ws", "disable_ws", "dws"]:
554
554
  sb.disable_ws = True
555
555
  continue
556
556
  # Handle: -D enable-ws / enable_ws
@@ -1231,10 +1231,6 @@ def behave_dashboard_prepare():
1231
1231
  c1 = ""
1232
1232
  cr = ""
1233
1233
  if not is_linux:
1234
- if is_windows and hasattr(colorama, "just_fix_windows_console"):
1235
- colorama.just_fix_windows_console()
1236
- else:
1237
- colorama.init(autoreset=True)
1238
1234
  c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
1239
1235
  cr = colorama.Style.RESET_ALL
1240
1236
  print("Dashboard: %s%s%s\n%s" % (c1, dash_path, cr, stars))
@@ -1346,10 +1342,6 @@ def _perform_behave_terminal_summary_():
1346
1342
  c2 = ""
1347
1343
  cr = ""
1348
1344
  if not is_linux:
1349
- if is_windows and hasattr(colorama, "just_fix_windows_console"):
1350
- colorama.just_fix_windows_console()
1351
- else:
1352
- colorama.init(autoreset=True)
1353
1345
  c2 = colorama.Fore.MAGENTA + colorama.Back.LIGHTYELLOW_EX
1354
1346
  cr = colorama.Style.RESET_ALL
1355
1347
  if sb_config.dashboard:
@@ -4,7 +4,6 @@
4
4
 
5
5
  import colorama
6
6
  import os
7
- import sys
8
7
  from contextlib import suppress
9
8
 
10
9
  r"""
@@ -17,13 +16,6 @@ r"""
17
16
 
18
17
 
19
18
  def get_seleniumbase_logo():
20
- if (
21
- "win32" in sys.platform
22
- and hasattr(colorama, "just_fix_windows_console")
23
- ):
24
- colorama.just_fix_windows_console()
25
- else:
26
- colorama.init(autoreset=True)
27
19
  c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
28
20
  c2 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
29
21
  c3 = colorama.Back.CYAN