Skip to content

Commit acf8bac

Browse files
authored
Merge pull request #142 from seleniumbase/better-error-handling
Better error handling
2 parents f5309ea + d3ef332 commit acf8bac

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[pytest]
2-
addopts = --capture=no --with-selenium --ignore conftest.py
2+
addopts = --capture=no --ignore conftest.py

seleniumbase/fixtures/base_case.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class MyTestClass(BaseCase):
4545
from seleniumbase.fixtures import page_utils
4646
from seleniumbase.fixtures import xpath_to_css
4747
from selenium.common.exceptions import (StaleElementReferenceException,
48-
TimeoutException,
4948
WebDriverException)
5049
from selenium.common import exceptions as selenium_exceptions
5150
try:
@@ -1153,8 +1152,8 @@ def wait_for_angularjs(self, timeout=settings.LARGE_TIMEOUT, **kwargs):
11531152
'suffix': suffix}
11541153
try:
11551154
self.execute_async_script(script, timeout=timeout)
1156-
except TimeoutException:
1157-
pass
1155+
except Exception:
1156+
time.sleep(0.05)
11581157

11591158
def wait_for_and_accept_alert(self, timeout=settings.LARGE_TIMEOUT):
11601159
if self.timeout_multiplier and timeout == settings.LARGE_TIMEOUT:
@@ -1464,6 +1463,10 @@ def setUp(self):
14641463
self.headless_active = True
14651464

14661465
# Launch WebDriver for both Pytest and Nosetests
1466+
if not hasattr(self, "browser"):
1467+
raise Exception("""SeleniumBase plugins did not load! """
1468+
"""Please reinstall using:\n"""
1469+
""" >>> "python setup.py develop" <<< """)
14671470
self.driver = browser_launcher.get_driver(self.browser,
14681471
self.headless,
14691472
self.use_grid,

server_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setup(
1010
name='seleniumbase',
11-
version='1.5.5',
11+
version='1.5.6',
1212
description='Web Automation & Testing Framework - http://seleniumbase.com',
1313
long_description='Web Automation and Testing Framework - seleniumbase.com',
1414
platforms='Mac * Windows * Linux * Docker',

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# nocapture=1 displays print statements from output. Undo this by using: --nologcapture
44
# logging-level=INFO keeps the logs much cleaner than using DEBUG
55
nocapture=1
6-
with-selenium=1
76
logging-level=INFO
87

98
[bdist_wheel]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setup(
1010
name='seleniumbase',
11-
version='1.5.5',
11+
version='1.5.6',
1212
description='Web Automation & Testing Framework - http://seleniumbase.com',
1313
long_description='Web Automation and Testing Framework - seleniumbase.com',
1414
platforms='Mac * Windows * Linux * Docker',

0 commit comments

Comments
 (0)