【发布时间】:2021-04-26 22:33:17
【问题描述】:
我正在尝试使用 Selenium 登录该网站: https://www.gamingintelligence.com/my-account
到目前为止我已经这样做了:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
username = 'my_user'
password = 'my_pass'
chrome_options = Options()
chrome_options.add_argument("--incognito")
driver = webdriver.Chrome(chrome_options=chrome_options, executable_path='./chromedriver')
url = "https://www.gamingintelligence.com/my-account"
driver.get(url)
driver.find_element_by_xpath('//*[@id="nav-login-tab"]').click()
driver.find_element_by_xpath('//*[@id="username"]').send_keys(username)
但我收到此错误:
ElementNotInteractableException: Message: element not interactable
HTML 是:
<input type="text" class="form-control xh-highlight" name="username"
id="username" autocomplete="username" value="" required="" style="background-
image: ...">
【问题讨论】:
标签: python selenium authentication input