from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Chrome('chromedriver.exe')
driver.find_element_by_xpath('//*[@id="wrapwrap"]/header/div/div/div/a').click() // click the SIGN IN button
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.XPATH, //*[@id="login"]))) // wait the login page
driver.find_element_by_xpath('//*[@id="login"]').send_keys('your id') // send your id the web
driver.find_element_by_xpath('//*[@id="password"]').send_keys('your pw') // send your pw the web
也许硒可以帮助你
Selenium自动化了支持Internet Explorer、Chrome、Firefox的浏览器。。。等
你可以发送按键和点击按钮,其他所有的事情。你知道吗
odoo登录示例:
相关问题 更多 >
编程相关推荐