from selenium import webdriver
from selenium.webdriver.common.by import By
broswer = webdriver.Chrome()
broswer.get('https://www.taobao.com/')
broswer.find_element(By.XPATH,'//*[@id="q"]').
代码如上 broswer.find_element(By.XPATH,'//*[@id="q"]'). 加了点之后后面不会直接出现click方法 send_key也是这样
selenium3.141在vscode中运行有click等代码提示。这可能是不同的版本或者编辑器插件不同,另外在selenium最好使用find_element_by_xpath。。。
尝试把chromedrive.exe放放项目文件内,然后把broswer = webdriver.Chrome()写成broswer = webdriver.Chrome(chromedrive.exe)
多输入两个字,比如在后面输出sk,看看有么有?
前面加一行 from selenium.webdriver.common.keys import Keys
问题解决了嘛,我也遇到了