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()


posted @ 2018-07-31 16:14  idlewith  阅读(308)  评论(0编辑  收藏  举报