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)

  

posted @ 2019-03-10 18:17  CrossPython  阅读(4108)  评论(0编辑  收藏  举报