я пытаюсь войти в мою учетную запись Google, используя python selenium с chromedriver, код работает, но не в автономном режиме. в хм я получаю, что identifierId никогда не появляется: (
РЕДАКТИРОВАТЬ: добавлено пропущенное --disable-gpu
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument('--headless')
chrome_options.add_argument('--window-size=1920,1080')
def do_login(email, password):
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get('https://accounts.google.com/signin/v2/identifier?flowName=GlifWebSignIn&flowEntry=ServiceLogin')
email_phone = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "//input[@id='identifierId']")))
email_phone.send_keys(email)
driver.find_element_by_id("identifierNext").click()
pw = WebDriverWait(driver, 5).until(
EC.element_to_be_clickable((By.XPATH, "//input[@name='password']"))
)
pw.send_keys(password)
driver.find_element_by_id("passwordNext").click()
time.sleep(2)
print(driver.title)
driver.close()
должен войти в систему, как в режиме без головы