Skip to content

Commit badaca9

Browse files
committed
Ignore SeleniumBase JS errors during website JS validation
1 parent 920597e commit badaca9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1699,10 +1699,13 @@ def assert_no_js_errors(self):
16991699
# If unable to get browser logs, skip the assert and return.
17001700
return
17011701

1702+
messenger_library = "//cdnjs.cloudflare.com/ajax/libs/messenger"
17021703
errors = []
17031704
for entry in browser_logs:
17041705
if entry['level'] == 'SEVERE':
1705-
errors.append(entry)
1706+
if messenger_library not in entry['message']:
1707+
# Add errors if not caused by SeleniumBase dependencies
1708+
errors.append(entry)
17061709
if len(errors) > 0:
17071710
current_url = self.get_current_url()
17081711
raise Exception(

0 commit comments

Comments
 (0)