I'm trying to finding a way to check if a new page/window is opened successfully and has content or not. I know that selenium is not able to check code 200 to see if the page is successfully loaded or not. So what should I do in order to find out if the page is loaded successfully?
while True:
try:
driver.find_element_by_css_selector("#showbtn").click()
print ("Page Loaded Successfully")
break
except:
print ("Page loading failed")
time.sleep(5)