直接代码
#导入软件包
from selenium import webdriver
import time
#打开工具的绝对路径
driver=webdriver.Chrome(r'F:\du\chromedriver_win32\chromedriver.exe')
#获取网址
driver.get('https://login.taobao.com/member/login.jhtml?spm=a21bo.2017.754894437.1.5af911d9DfyIyk&f=top&redirectURL=https%3A%2F%2Fwww.taobao.com%2F')
#找到登录界面
driver.find_element_by_xpath('//*[@id="J_QRCodeLogin"]/div[5]/a[1]').click()
driver.find_element_by_xpath('//*[@id="TPL_username_1"]').send_keys("******")
driver.find_element_by_xpath('//*[@type="password"]').send_keys("******")
driver.find_element_by_xpath('//*[@id="J_SubmitStatic"]').click()
time.sleep(2)
#关闭并退出
driver.close()
driver.quit()
分享链接
. selenium.common.exceptions.WebDriverException: Message: unknown Error: cannot find Chrome binary - 千城墨白 - CSDN博客
https://blog.csdn.net/n123456uo/article/details/91420342