Python Selenium element is not reachable by keyboard

碰到这个问题,没法解决,

最后这么搞的

 

pcAction.move_by_offset(571, 534).click().perform() #激活输入框
driver.switch_to.active_element.send_keys(NAME)  #输入


换了个方法
driver.switch_to.active_element.send_keys(Keys.TAB)
time.sleep(0.3)
driver.switch_to.active_element.send_keys(NAME)
time.sleep(0.3)

driver.switch_to.active_element.send_keys(Keys.TAB)
time.sleep(0.3)
driver.switch_to.active_element.send_keys(PASSWORD)
time.sleep(0.3)

  

    原文作者:CrossPython
    原文地址: https://www.cnblogs.com/pythonClub/p/10506270.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞