法典
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
chrome = webdriver.Chrome(executable_path= 'C:\webdriver.exe\chromedriver.exe',port=9515)
url = 'https://protonmail.com/'
chrome.get(url)
chrome.implicitly_wait(10)
chrome.find_element_by_xpath('//*[@class="btn btn-default btn-short"]').click()
chrome.find_element_by_class_name("panel-heading").click()
chrome.find_element_by_id("freePlan").click()
chrome.find_element_by_id('username')
chrome.find_element_by_id("password").send_keys('password')
chrome.find_element_by_id("passwordc").send_keys('password')
断续器
<input placeholder="Choose username" required="" name="username" messages="[object Object]" iframename="top" pattern=".{1,40}" id="username" class="input">
问题
chrome.find_element_by_id('username')
我正在尝试输入用户名;但是,python说它找不到该元素,即使我正在使用它给你的用户名id。
qq_花开花谢_0
温温酱
相关分类