Merge pull request #1923 from seleniumbase/update-recorder-and-pytest

Update Recorder Mode and Refresh Dependencies
This commit is contained in:
Michael Mintz 2023-06-24 15:37:35 -04:00 committed by GitHub
commit 459c28b263
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 12 deletions

View File

@ -64,6 +64,8 @@ class WordleTests(BaseCase):
found_word = False
for attempt in range(6):
num_attempts += 1
if len(self.word_list) == 0:
self.fail("Today's word was not found in my dictionary!")
word = random.choice(self.word_list)
letters = []
for letter in word:

View File

@ -27,7 +27,7 @@ cssselect2==0.7.0
tinycss2==1.2.1
defusedxml==0.7.1
mkdocs==1.4.3
mkdocs-material==9.1.16
mkdocs-material==9.1.17
mkdocs-exclude-search==0.6.5
mkdocs-simple-hooks==0.1.5
mkdocs-material-extensions==1.1.1

View File

@ -5,7 +5,7 @@ packaging>=23.1;python_version>="3.7"
setuptools>=59.6.0;python_version<"3.7"
setuptools>=68.0.0;python_version>="3.7"
keyring>=23.4.1;python_version<"3.8"
keyring>=24.0.1;python_version>="3.8"
keyring>=24.1.1;python_version>="3.8"
tomli>=1.2.3;python_version<"3.7"
tomli>=2.0.1;python_version>="3.7"
tqdm>=4.64.1;python_version<"3.7"
@ -19,7 +19,7 @@ certifi>=2023.5.7
filelock>=3.4.1;python_version<"3.7"
filelock>=3.12.2;python_version>="3.7"
platformdirs>=2.4.0;python_version<"3.7"
platformdirs>=3.7.0;python_version>="3.7"
platformdirs>=3.8.0;python_version>="3.7"
parse>=1.19.1
pyparsing>=3.0.7;python_version<"3.7"
pyparsing>=3.1.0;python_version>="3.7"
@ -34,7 +34,7 @@ chardet==5.1.0;python_version>="3.7"
charset-normalizer==2.0.12;python_version<"3.7"
charset-normalizer==3.1.0;python_version>="3.7"
urllib3==1.26.12;python_version<"3.7"
urllib3>=1.26.15,<2.1.0;python_version>="3.7"
urllib3>=1.26.16,<2.1.0;python_version>="3.7"
requests==2.27.1;python_version<"3.7"
requests==2.31.0;python_version>="3.7"
requests-toolbelt==1.0.0
@ -61,7 +61,7 @@ pluggy==1.0.0;python_version<"3.7"
pluggy==1.2.0;python_version>="3.7"
py==1.11.0
pytest==7.0.1;python_version<"3.7"
pytest==7.3.2;python_version>="3.7"
pytest==7.4.0;python_version>="3.7"
pytest-forked==1.4.0;python_version<"3.7"
pytest-forked==1.6.0;python_version>="3.7"
pytest-html==2.0.1

View File

@ -1,2 +1,2 @@
# seleniumbase package
__version__ = "4.15.4"
__version__ = "4.15.5"

View File

@ -188,6 +188,14 @@ def main():
run_cmd = "%s -m pytest %s --rec -q -s --url=%s" % (
sys.executable, file_name, start_page
)
if '"' not in start_page:
run_cmd = '%s -m pytest %s --rec -q -s --url="%s"' % (
sys.executable, file_name, start_page
)
elif "'" not in start_page:
run_cmd = "%s -m pytest %s --rec -q -s --url='%s'" % (
sys.executable, file_name, start_page
)
if use_edge:
run_cmd += " --edge"
if force_gui:

View File

@ -134,6 +134,16 @@ def do_recording(file_name, url, overwrite_enabled, use_chrome, window):
"%s -m seleniumbase mkrec %s --url=%s --gui"
% (sys.executable, file_name, url)
)
if '"' not in url:
command = (
'%s -m seleniumbase mkrec %s --url="%s" --gui'
% (sys.executable, file_name, url)
)
elif "'" not in url:
command = (
"%s -m seleniumbase mkrec %s --url='%s' --gui"
% (sys.executable, file_name, url)
)
if not use_chrome:
command += " --edge"
if (

View File

@ -7667,9 +7667,9 @@ class BaseCase(unittest.TestCase):
sb_config._is_timeout_changed = False
self.__overrided_default_timeouts = False
def fail(self, msg=None):
def fail(self, msg="fail() called!"):
"""Fail immediately, with the given message."""
super().fail(msg)
raise self.failureException(msg)
def skip(self, reason=""):
"""Mark the test as Skipped."""

View File

@ -131,7 +131,7 @@ setup(
'setuptools>=59.6.0;python_version<"3.7"',
'setuptools>=68.0.0;python_version>="3.7"',
'keyring>=23.4.1;python_version<"3.8"',
'keyring>=24.0.1;python_version>="3.8"',
'keyring>=24.1.1;python_version>="3.8"',
'tomli>=1.2.3;python_version<"3.7"',
'tomli>=2.0.1;python_version>="3.7"',
'tqdm>=4.64.1;python_version<"3.7"',
@ -145,7 +145,7 @@ setup(
'filelock>=3.4.1;python_version<"3.7"',
'filelock>=3.12.2;python_version>="3.7"',
'platformdirs>=2.4.0;python_version<"3.7"',
'platformdirs>=3.7.0;python_version>="3.7"',
'platformdirs>=3.8.0;python_version>="3.7"',
'parse>=1.19.1',
'pyparsing>=3.0.7;python_version<"3.7"',
'pyparsing>=3.1.0;python_version>="3.7"',
@ -160,7 +160,7 @@ setup(
'charset-normalizer==2.0.12;python_version<"3.7"',
'charset-normalizer==3.1.0;python_version>="3.7"',
'urllib3==1.26.12;python_version<"3.7"',
'urllib3>=1.26.15,<2.1.0;python_version>="3.7"',
'urllib3>=1.26.16,<2.1.0;python_version>="3.7"',
'requests==2.27.1;python_version<"3.7"',
'requests==2.31.0;python_version>="3.7"',
'requests-toolbelt==1.0.0',
@ -187,7 +187,7 @@ setup(
'pluggy==1.2.0;python_version>="3.7"',
"py==1.11.0",
'pytest==7.0.1;python_version<"3.7"',
'pytest==7.3.2;python_version>="3.7"',
'pytest==7.4.0;python_version>="3.7"',
'pytest-forked==1.4.0;python_version<"3.7"',
'pytest-forked==1.6.0;python_version>="3.7"',
"pytest-html==2.0.1", # Newer ones had issues