<img src="images/file_explorer.png" class="browse" style="cursor: pointer;height:33px;" title="file from your computer">
from selenium import webdriver
from selenium.webdriver.chrome.webdriver import WebDriver
from selenium.webdriver.common.keys import Keys
import time
driver = webdriver.Chrome(executable_path="C:/webdrivers/chromedriver.exe")
driver.maximize_window()
driver.get("https://www.collabera.com/find-a-job/search-jobs/?sort_by=dateposted&Posteddays=4000&searchany=QA&anylocation=usa")
time.sleep(3)
driver.find_element_by_css_selector("#srchpgbnnr > div:nth-child(1) > div:nth-child(1) > div > a").click()
driver.find_element_by_css_selector("body > section:nth-child(7) > div:nth-child(2) > div > div.col-md-offset-2.col-md-3.__jobdesc-sidebar.col-xs-hide > div > a").click()
time.sleep(15)
driver.find_element_by_css_selector("img.browse[src='images/file_explorer.png'][title='file from yourcomputer']").send_keys("C:\\Users\\user\\Desktop\\collebra.txt")
网址:https ://www.collabera.com/find-a-job/search-jobs/job-details/126013-qa-analyst-jobs-ann-arbor-mi
我的代码高于一个它不起作用如何在上面的上传按钮代码中找到元素