rgratis
11 years agoFrequent Contributor
Issues entering values into text fields in Chrome (Keys method)
I am having a very odd issue with TestComplete 10.0.531.7 and Chrome 33.0.1750.154 m. If the cursor is in the browser address bar, any Keys input goes into the address bar, even when I am directly sending the Keys command to a certain text field object.
Example using the Functional Web Testing forum page search bar:
Call Sys.Browser("chrome").Page("http://smartbear.com/forums/f75/functional-web-testing/").Form("form").Panel("container").Panel("undefined_sticky_wrapper").Panel(0).Panel(0).Header(0).Panel(1).Nav(0).Panel(2).Panel("search_small").Textbox(0).Keys("Text Entry")
Normally, running that script command puts "Text Entry" into the search bar. If I place the mouse cursor anywhere in the Chrome address bar and run that script command, the input goes into the address bar.
This is a problem because Chrome automatically places the cursor into the address bar upon start such that my tests fail when they go to log in to our application (username and password end up in address bar of Chrome).
A workaround appears to be to have my test click the username field before trying to enter text, but this seems like a bug to me since I'm targetting the text field object for the Keys command and not just sending Keys to the desktop.
This behavior is not exhibited in IE11 or Firefox 27. If I place the cursor into the address bar and then call a Keys command on the text field, the text is entered into the right field.
Example using the Functional Web Testing forum page search bar:
Call Sys.Browser("chrome").Page("http://smartbear.com/forums/f75/functional-web-testing/").Form("form").Panel("container").Panel("undefined_sticky_wrapper").Panel(0).Panel(0).Header(0).Panel(1).Nav(0).Panel(2).Panel("search_small").Textbox(0).Keys("Text Entry")
Normally, running that script command puts "Text Entry" into the search bar. If I place the mouse cursor anywhere in the Chrome address bar and run that script command, the input goes into the address bar.
This is a problem because Chrome automatically places the cursor into the address bar upon start such that my tests fail when they go to log in to our application (username and password end up in address bar of Chrome).
A workaround appears to be to have my test click the username field before trying to enter text, but this seems like a bug to me since I'm targetting the text field object for the Keys command and not just sending Keys to the desktop.
This behavior is not exhibited in IE11 or Firefox 27. If I place the cursor into the address bar and then call a Keys command on the text field, the text is entered into the right field.
Hi Rachel,
Our R&D team was able to reproduce the issue - they are going to fix it in the nearest product update.
If this issue is critical for you, please contact our TestComplete Support team - they will try to find a workaround or consider the possibility of creating a patch.
Sorry for the inconvenience.