Skip to content

Commit a9cea39

Browse files
committed
Check for Javascript errors on page loads if the option is on.
1 parent a7ff797 commit a9cea39

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,6 +2150,8 @@ def wait_for_ready_state_complete(self, timeout=settings.EXTREME_TIMEOUT):
21502150
timeout = self.__get_new_timeout(timeout)
21512151
is_ready = js_utils.wait_for_ready_state_complete(self.driver, timeout)
21522152
self.wait_for_angularjs(timeout=settings.MINI_TIMEOUT)
2153+
if self.js_checking_on:
2154+
self.assert_no_js_errors()
21532155
if self.ad_block_on:
21542156
# If the ad_block feature is enabled, then block ads for new URLs
21552157
current_url = self.get_current_url()
@@ -2663,6 +2665,7 @@ def setUp(self):
26632665
self.demo_sleep = pytest.config.option.demo_sleep
26642666
self.highlights = pytest.config.option.highlights
26652667
self.message_duration = pytest.config.option.message_duration
2668+
self.js_checking_on = pytest.config.option.js_checking_on
26662669
self.ad_block_on = pytest.config.option.ad_block_on
26672670
self.verify_delay = pytest.config.option.verify_delay
26682671
self.timeout_multiplier = pytest.config.option.timeout_multiplier

0 commit comments

Comments
 (0)