def is_404_page(browser):
 return ('Page not found (404)' in browser.find_element_by_tag_name('h1').text)

def is_404_page ( browser ) : return ( 'Page not found (404)' in browser . find_element_by_tag_name ( 'h1' ) . text )
check if page is 404 .