Selenium typeKeys dot problem: strips out dot from the string entered
Submitted by admin on Fri, 07/01/2011 - 13:19.
We had problems using typeKeys in selenium python.
When a string was entered in a textbox using typeKeys, for eg typeKeys(locator,'test.me@test.me.com'), it ended up typing 'testme@testmecom'.
We looked around on Google and found out that this is a known issue with typeKeys.
We came up with a workaround to resolve this issue and that was to use a combination of 'type' and 'typeKeys'. As you may or may not be aware, 'type' itself does not have such issues. But for our needs, just using 'type' was not sufficient as it failed to invoke a Ajax dropdown that was supposed to display a lot of matching options to select from depending on the key pressed. Hence we had to use 'typeKeys' for this.
The combo worked well and here's the solution that worked for us.
We did this in our selenium python script and it works just fine.
For example: If there's an email address to be entered in a text box: test.me@test.me.uk
Then do
type(locator,’test.me@test.me.’)
typeKeys(locator,’uk’)
Maybe a very crude way, but it did the job.
Hope this helps someone else with a similar problem.