我想使用硒登錄到此網站: 但它表示密碼和登錄不可見。我環顧四周,看到有人說要等待,但等待似乎沒有幫助。這裏是我的代碼:使用硒與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