phpunit-selenium
phpunit-selenium copied to clipboard
Selenium filling in fields with masks __.__.__.___.__
I have an issue and can't seem to solve it or find any documentation about it. I found an example online here: http://www.angelwatt.com/coding/masked_input.php
It's the SSN field: ...-..-.... it works somewhat the same field as I'm working with. Whenever you fill something in with selenium it hops towards the end. I also tried to sendkeys 1 by 1 or use tabs etc. But it just hops towards the end of the field.
Is there anything that I can do to fill in fields like this?
$this->webDriver->get('http://www.angelwatt.com/coding/masked_input.php');
sleep(3);
$this->webDriver->findElement(WebDriverBy::xpath('//*[@id="ex-3"]'))->click();
$this->webDriver->getKeyboard()->sendKeys('481878483');
Basically this issue on SO: http://stackoverflow.com/questions/24911185/filling-in-mask-fields-with-phpunit-selenium
Thanks in advance
PS: Any workaround is welcome
Have you tried different browsers to see if this is a browser-specific problem with some of the drivers? Also, it seems not to be dependent on the PHP bindings as much as on the Selenium Server implementation, so by asking this question at the upstream level (Selenium support) you could get the help of other communities (Java, Ruby, C#...) which encountered the same problem.
Hmm It's on Firefox 30.0. If I would try it with Chrome, the field would behave differently but I'll look over at the selenium support and try it in chrome/ie if they can give an answer I'll post it here too.