cannot focus element解决方案

If you enconter error "cannot focus element" when using Selenium+Python in Chrome to input value, you can use below code instead:

from selenium.webdriver.common.action_chains import ActionChains

element1 = driver.find_element_by_id("inputCtrl0")

ActionChains(driver).click(element1).send_keys("111").perform()

猜你喜欢

转载自www.cnblogs.com/AmyHu/p/9067066.html
今日推荐