Merge pull request #1422 from seleniumbase/refresh-python-dependencies
Handle edge cases after successful actions and refresh dependencies
This commit is contained in:
commit
5f26c1f1d4
|
@ -175,12 +175,6 @@ class HackTests(BaseCase):
|
|||
self.highlight('a[aria-label*="Try PlayF"]', loops=4, scroll=False)
|
||||
self.highlight('a[aria-label*="Sign in to"]', loops=6, scroll=False)
|
||||
|
||||
self.open("https://www.snapchat.com/")
|
||||
self.set_text_content("h1", aybabtu)
|
||||
zoom_out = "h1{zoom: 0.85;-moz-transform: scale(0.85);}"
|
||||
self.add_css_style(zoom_out)
|
||||
self.highlight("h1", loops=8, scroll=False)
|
||||
|
||||
self.open("https://store.steampowered.com/")
|
||||
self.set_text_content('div.content a[href*="/about/"]', " ")
|
||||
self.set_text_content('div.content a[href*="help.steam"]', aybabtu)
|
||||
|
|
|
@ -7,7 +7,7 @@ class GoogleTests(BaseCase):
|
|||
[
|
||||
["Download Python", "Download Python", "img.python-logo"],
|
||||
["Wikipedia", "www.wikipedia.org", "img.central-featured-logo"],
|
||||
["SeleniumBase GitHub.com", "SeleniumBase", 'img[title*="Sele"]'],
|
||||
["SeleniumBase.io Docs", "SeleniumBase", 'img[alt*="SeleniumB"]'],
|
||||
]
|
||||
)
|
||||
def test_parameterized_google_search(self, search_key, expected_text, img):
|
||||
|
@ -18,7 +18,5 @@ class GoogleTests(BaseCase):
|
|||
self.click('a:contains("%s")' % expected_text)
|
||||
self.assert_element(img)
|
||||
if "SeleniumBase" in search_key:
|
||||
self.click('img[alt="SeleniumBase Docs"]')
|
||||
self.assert_element('[title="SeleniumBase Docs"]')
|
||||
self.click('a:contains("Features List")')
|
||||
self.assert_text("Features List", "h1")
|
||||
self.click('img[alt="SeleniumBase"]')
|
||||
self.assert_element('img[title="SeleniumBase"]')
|
||||
|
|
|
@ -4,7 +4,6 @@ from seleniumbase import BaseCase
|
|||
class DocsSiteTests(BaseCase):
|
||||
def test_docs(self):
|
||||
self.open("https://seleniumbase.io/")
|
||||
self.delete_all_cookies()
|
||||
self.assert_text("SeleniumBase", "h1")
|
||||
self.js_click('a[href="help_docs/features_list/"]')
|
||||
self.assert_exact_text("Features List", "h1")
|
||||
|
@ -14,7 +13,7 @@ class DocsSiteTests(BaseCase):
|
|||
self.assert_exact_text("Command Line Options", "h1")
|
||||
self.js_click('a[href="../../examples/example_logs/ReadMe/"]')
|
||||
self.assert_exact_text("Dashboard / Reports", "h1")
|
||||
self.js_click('[href="../../../seleniumbase/console_scripts/ReadMe/"]')
|
||||
self.js_click('a[href*="/seleniumbase/console_scripts/ReadMe/"]')
|
||||
self.assert_exact_text("Console Scripts", "h1")
|
||||
self.js_click('a[href="../../../help_docs/syntax_formats/"]')
|
||||
self.assert_exact_text("Syntax Formats", "h1")
|
||||
|
@ -22,5 +21,5 @@ class DocsSiteTests(BaseCase):
|
|||
self.assert_exact_text("Recorder Mode", "h1")
|
||||
self.js_click('a[href="../method_summary/"]')
|
||||
self.assert_exact_text("API Reference", "h1")
|
||||
self.js_click('img[alt="logo"]')
|
||||
self.click('img[alt="logo"]')
|
||||
self.assert_text("SeleniumBase", "h1")
|
||||
|
|
|
@ -70,7 +70,7 @@ pytest-html==1.22.1;python_version<"3.6"
|
|||
pytest-html==2.0.1;python_version>="3.6"
|
||||
pytest-metadata==1.8.0;python_version<"3.6"
|
||||
pytest-metadata==1.11.0;python_version>="3.6" and python_version<"3.7"
|
||||
pytest-metadata==2.0.1;python_version>="3.7"
|
||||
pytest-metadata==2.0.2;python_version>="3.7"
|
||||
pytest-ordering==0.6
|
||||
pytest-rerunfailures==8.0;python_version<"3.6"
|
||||
pytest-rerunfailures==10.2;python_version>="3.6"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
# seleniumbase package
|
||||
__version__ = "3.5.5"
|
||||
__version__ = "3.5.6"
|
||||
|
|
|
@ -192,6 +192,11 @@ class BaseCase(unittest.TestCase):
|
|||
if "ERR_CONNECTION_TIMED_OUT" in e.msg:
|
||||
time.sleep(0.5)
|
||||
self.driver.get(url)
|
||||
elif (
|
||||
"cannot determine loading status" in e.msg
|
||||
or "unexpected command response" in e.msg
|
||||
):
|
||||
pass # Odd issue where the open did happen. Continue.
|
||||
else:
|
||||
raise Exception(e.msg)
|
||||
if self.driver.current_url == pre_action_url and pre_action_url != url:
|
||||
|
@ -377,7 +382,10 @@ class BaseCase(unittest.TestCase):
|
|||
)
|
||||
element.click()
|
||||
except WebDriverException as e:
|
||||
if "cannot determine loading status" in e.msg:
|
||||
if (
|
||||
"cannot determine loading status" in e.msg
|
||||
or "unexpected command response" in e.msg
|
||||
):
|
||||
pass # Odd issue where the click did happen. Continue.
|
||||
else:
|
||||
self.wait_for_ready_state_complete()
|
||||
|
@ -603,7 +611,10 @@ class BaseCase(unittest.TestCase):
|
|||
try:
|
||||
element.send_keys(Keys.RETURN)
|
||||
except WebDriverException as e:
|
||||
if "cannot determine loading status" in e.msg:
|
||||
if (
|
||||
"cannot determine loading status" in e.msg
|
||||
or "unexpected command response" in e.msg
|
||||
):
|
||||
pass # Odd issue where the click did happen. Continue.
|
||||
else:
|
||||
raise e
|
||||
|
@ -623,7 +634,10 @@ class BaseCase(unittest.TestCase):
|
|||
try:
|
||||
element.send_keys(Keys.RETURN)
|
||||
except WebDriverException as e:
|
||||
if "cannot determine loading status" in e.msg:
|
||||
if (
|
||||
"cannot determine loading status" in e.msg
|
||||
or "unexpected command response" in e.msg
|
||||
):
|
||||
pass # Odd issue where the click did happen. Continue.
|
||||
else:
|
||||
raise e
|
||||
|
|
2
setup.py
2
setup.py
|
@ -195,7 +195,7 @@ setup(
|
|||
'pytest-html==2.0.1;python_version>="3.6"', # Newer ones had issues
|
||||
'pytest-metadata==1.8.0;python_version<"3.6"',
|
||||
'pytest-metadata==1.11.0;python_version>="3.6" and python_version<"3.7"', # noqa: E501
|
||||
'pytest-metadata==2.0.1;python_version>="3.7"',
|
||||
'pytest-metadata==2.0.2;python_version>="3.7"',
|
||||
"pytest-ordering==0.6",
|
||||
'pytest-rerunfailures==8.0;python_version<"3.6"',
|
||||
'pytest-rerunfailures==10.2;python_version>="3.6"',
|
||||
|
|
Loading…
Reference in New Issue