def assert_no_js_errors(self):
try:<EOL><INDENT>browser_logs = self.driver.get_log('<STR_LIT>')<EOL><DEDENT>except (ValueError, WebDriverException):<EOL><INDENT>return<EOL><DEDENT>messenger_library = "<STR_LIT>"<EOL>errors = []<EOL>for entry in browser_logs:<EOL><INDENT>if entry['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>if messenger_library not in entry['<STR_LIT:message>']:<EOL><INDENT>errors.append(entry)<EOL><DEDENT><DEDENT><DEDENT>if len(errors) > <NUM_LIT:0>:<EOL><INDENT>current_url = self.get_current_url()<EOL>raise Exception(<EOL>"<STR_LIT>" % (current_url, errors))<EOL><DEDENT>
Asserts that there are no JavaScript "SEVERE"-level page errors.
            Works ONLY for Chrome (non-headless) and Chrome-based browsers.
            Does NOT work on Firefox, Edge, IE, and some other browsers:
                * See https://github.com/SeleniumHQ/selenium/issues/1161
            Based on the following Stack Overflow solution:
                * https://stackoverflow.com/a/41150512/7058266