import undetected_chromedriver.v2 as uc
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
def main(url):
options = uc.ChromeOptions()
options.headless = True
driver = uc.Chrome(options=options)
driver.get(url)
try:
WebDriverWait(driver, 10).until(
EC.title_contains(('Reservations'))
)
print(driver.title)
except Exception as e:
print(type(e).__name__)
finally:
driver.quit()
if __name__ == "__main__":
main('https://www.example.com/')
if headless = True the site isn't responsive. How can i solve that?
P.S am seeking solution for selenium only.