我想使用硒登录到此网站: 但它表示密码和登录不可见。我环顾四周,看到有人说要等待,但等待似乎没有帮助。这里是我的代码:使用硒与python登录网站
# importing libraries
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import re, time, csv
driver = webdriver.Firefox()
driver.get("https://platform.openquake.org/account/login/")
driver.switch_to
driver.maximize_window
time.sleep(10)
username = driver.find_element_by_xpath("//input[@name='username']")
username.send_keys("hi there")
错误消息:
ElementNotVisibleException: Element is not currently visible and so may not be interacted with
这可能会有所帮助:http://stackoverflow.com/questions/27927964/selenium-element-not-可见,例外 –
嗯,它有点混乱,如何为我的特殊情况做到这一点。我能够解决使用标签来解决它。 – Corncobpipe