cannot focus element解决方案

Posted Amy_Hu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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()

 

以上是关于cannot focus element解决方案的主要内容,如果未能解决你的问题,请参考以下文章

Element-UI级联选择器el-cascader报错Cannot read property level of null

vue element ui input 自动获取焦点(解决autofocus只有第一次起作用问题,)

pom文件出现Element 'xxxxxxx' cannot have character [children],because the type's content typ

Cannot find element: #App

[Vue warn]: Cannot find element: #app

xml标签报错Element ‘xxxxx‘ cannot have character [chidren]