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)