Using Selenium with PhantomJS (python 2.7) I find a text box on a page (Cisco Unity 7 FYI), and try to send keys.
driver.find_element_by_id("pwdPwdPassword").send_keys("12345678")
driver.save_screenshot('screen.png')
Looking at the screen shot, only 2 keys are actually sent. Not sure which ones as Unity masks the password. I notice that if I walk through my script in IDLE and slowly enter
driver.find_element_by_id("pwdPwdPassword").send_keys("1")
driver.find_element_by_id("pwdPwdPassword").send_keys("2")
driver.find_element_by_id("pwdPwdPassword").send_keys("3")
driver.find_element_by_id("pwdPwdPassword").send_keys("4")
....
The keystrokes actually make it into the text box. I tried putting a time.sleep(2) between each send_keys in my script but the results are the same. I am hoping there is a trick to this so I don't have to add 30 seconds to my script just to enter this password!
Thanks!!!
def send_keys( element, keys_to_send): for key in keys_to_send: element.send_keys(key)(Of course, element should be defined first)