1

I have piece of code that makes a search on Google, clicks on something which send it to the sign in page (Google). I then expect the user to complete the "sign in" process manually and after it has been done the code should automatically continue. Yet, after the manual intervention it just refuses to find anything on the page. It might be Google limiting what I can interact with, or a problem with my code.

Here is my code:

    driver.get(i) #i is  "https://www.google.com/search?q=Albert+%26+Victoria+Hotel%2C+Southport"
    sleep(2)
    try:
        driver.find_element(By.ID, "L2AGLb").click()
    except:
        pass
    sleep(2)
    driver.find_element(By.CSS_SELECTOR, "[jsaction='CnOdef']").click()
    sleep(2)
    driver.find_element(By.CSS_SELECTOR, "[jsaction='lQuKqf']").click()
    sleep(30) # this is where i expect the user to manually sign in
    if selected.get() == "website": #predefined
        field = driver.find_element(By.XPATH, "/html/body/div/c-wiz/div/div/div/div[4]")

Does Selenium not allow user intervention, or is Google blocking it or something?

I believe that Selenium might not be registering the pop-up which is the element I am trying to interact with, as it appears after a few seconds.

Thank you in advance.

MINDTHEGAP
  • 21
  • 1

0 Answers0