分配按钮的代码是什么:
HTML 2-当我悬停在“添加拍卖任务”上时,它似乎会弹出一个称为javascript的东西,但我不知道。
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
from selenium.webdriver import ActionChains
from selenium.webdriver.support.ui import Select
browser = webdriver.Chrome("C:\Program Files\chromedriver_win32/chromedriver.exe")
actions = ActionChains(browser)
#Go to the desired website
browser.get("http://www.autoims.com/external/index.jsp")
usrname_box = browser.find_element_by_xpath('//*[@id="loginUsername"]')
pw_box = browser.find_element_by_xpath('//*[@id="password"]')
login_button = browser.find_element_by_xpath('//*[@id="submit"]')
#login process here
wait = WebDriverWait(browser, 10)
for vin in df['VIN']:
assignments = wait.until(EC.visibility_of_element_located((By.XPATH, '//*[@id="_img0"]')))
ActionChains(browser).move_to_element(assignments).perform()
add_assignment = wait.until(EC.visibility_of_element_located((By.XPATH, " HELP :( "))) #always fails
ActionChains(browser).move_to_element(add_assignment).click().perform()