How to detect when Selenium loads a browser's error page
Is there a universal way to detect when a selenium browser opens an error page? For example, disable your internet connection and do driver.get("http://google.com") In Firefox, Selenium will load the 'Try Again' error page containing text like "Firefox can't establish a connection to the server at www.google.com." Selenium will NOT throw any errors. Is there a browser-independent way to detect these cases? For firefox (python), I can do if "errorPageContainer" in [ elem.get_attribute("id") for elem in driver.find_elements_by_css_selector("body > div") ] But (1) this seems like computational