cannot focus element


from selenium.webdriver.common.action_chains import ActionChains
import time
from selenium import webdriver

driver = webdriver.Chrome()

tip_id = 'Tip_12340128'
tip_1 = driver.find_element_by_xpath('//*[@id="%s"]/div[2]/div[1]/table/tbody[2]/tr/td[2]' % tip_id)
time.sleep(1)
tip_1.click()

time.sleep(1)
actions = ActionChains(driver)
actions.move_to_element(tip_1)
time.sleep(1)
actions.click()
time.sleep(1)
actions.send_keys("asdfa")
actions.perform()


原文地址:https://www.cnblogs.com/otfsenter/p/9396481.html