def _validate_page(self, webdriver): if not "google.com" in webdriver.current_url: raise InvalidPageError("Not google.")
def _validate_page(self, webdriver): if not "yahoo.com" in webdriver.current_url: raise InvalidPageError("Not yahoo.")
def _validate_page(self, webdriver): current_url = webdriver.current_url if not "google" in current_url: raise InvalidPageError()
def _validate_page(self, webdriver): """Check to make sure we're on google.com""" if "google.com" not in webdriver.current_url: # Raise an InvalidPageError to let the PageFactory # know that this isn't a page match. raise InvalidPageError("This is not google.")