Python 找不到元素:Gmail电子邮件ID

Python 找不到元素:Gmail电子邮件ID,python,selenium-webdriver,gmail,Python,Selenium Webdriver,Gmail,正在尝试查找要向其发送密钥的gmail用户名的id。当使用下面的代码时,python不断返回无法定位元素的消息 chrome.通过xpath(“/*[@id='identifierId']”)查找元素 HTML是: 请帮助最近我用这个自动登录gmail: username = chrome.find_element_by_css_selector( "input[placeholder='Username']") password = chrome.find_element_b

正在尝试查找要向其发送密钥的gmail用户名的id。当使用下面的代码时,python不断返回无法定位元素的消息

chrome.通过xpath(“/*[@id='identifierId']”)查找元素

HTML是:


请帮助

最近我用这个自动登录gmail:

username = chrome.find_element_by_css_selector(
        "input[placeholder='Username']")
password = chrome.find_element_by_css_selector(
        "input[placeholder='Password']")
login_button = chrome.find_element_by_css_selector(
        "button.src-components-Login-LoginPanel-LoginForm-index__submit--2fvkB ")
username.send_keys(user)
password.send_keys(pwd)
login_button.click()
希望这有帮助