getting cannot focus element in chrome and edge using java/selenium

后端 未结 7 2229
南笙
南笙 2020-12-06 05:26

I am getting a cannot focus element error when running my test in chrome and edge in FF it works fine. I have tried posted resolutions but to no avail. I am not sure wha

7条回答
  •  佛祖请我去吃肉
    2020-12-06 05:59

    This is an edited version of the correct answer, as I was unable to just copy paste that code. With the code below you can copy paste it (If the element is found as id):

    elem = driver.find_element_by_id("WHATEVER THE ELEMENT ID IS HERE")
    actions = ActionChains(driver)
    actions.move_to_element(elem)
    actions.click()
    actions.send_keys("PUT YOUR TEXT IN HERE")
    actions.perform()
    

提交回复
热议问题