标签:pat find https win32 type com fir exe 自动登录
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.select import Select
import time
path = r'D:\selenium\chromedriver_win32\chromedriver.exe'
链接跳转
def ithome():
driver = webdriver.Chrome(path)
driver.get('https://www.ithome.com')
driver.find_element_by_css_selector('div.clearfix > div:nth-of-type(1) > a:first-child').click()
time.sleep(1)
driver.quit()
OA自动登录
def oalogon():
driver = webdriver.Chrome(path)
driver.get('http://ip/login/Login.jsp?logintype=1')
driver.find_element_by_name('loginid').send_keys('user')
driver.find_element_by_name('userpassword').send_keys('password')
driver.find_element_by_css_selector('#login').click()
driver.quit()
标签:pat find https win32 type com fir exe 自动登录
原文地址:https://www.cnblogs.com/kylingx/p/11915213.html