This is a migrated thread and some comments may be shown as answers.

Typeahead Failure

7 Answers 57 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Al asked on 10 Mar 2017, 11:33 PM

Have a simple typeahead box on a web site and I am able to record the actions to enter the text and select from the dropdown list that appears one of the selections. When playing this back it appears that the DOM does not refresh during the test, so I converted the step to a code step and added ActiveBrowser.RefreshDomTree() call. This did not help.

So I added a break point on the failing step to capture the DOM. I then opened the DOM explorer using that option right next to the capture option and hit refresh. Captured the results again (which now has the list items in it). But the test still fails.

There has to be someway to click an option in the list that appears (I could modify the input text that drive the list and get more or less options, but I only want to select a specific one form that list). Thoughts?

7 Answers, 1 is accepted

Sort by
0
Al
Top achievements
Rank 1
answered on 10 Mar 2017, 11:35 PM
Forgot to add the captures...
0
Al
Top achievements
Rank 1
answered on 10 Mar 2017, 11:35 PM
Forgot the capture files...
0
Elena
Telerik team
answered on 14 Mar 2017, 03:27 PM
Hello Al,

The captures are not available for some reason. However there is a suggestion that might be of help for the described case. Have you tried to enable 'SimulateRealTyping' for the recorded set text step (please refer to the screenshot)? If you would give this a try please remove the coded steps from the execution and let me know what the result would be. 

If the above does not change anything it would be helpful if you could provide access to the tested application along with a sample test navigating to the text box in question. 

Thanks in advance! 

Regards,
Elena Tsvetkova
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Al
Top achievements
Rank 1
answered on 14 Mar 2017, 04:04 PM

I figured out why the files were not available. It appears the captures exceeded the limit for attachments. I got both of the zips below 2MB each so I will attach them.

0
Al
Top achievements
Rank 1
answered on 14 Mar 2017, 04:05 PM

Here is the other capture zip.

Thanks for your help.

0
Elena
Telerik team
answered on 17 Mar 2017, 08:59 AM
Hello Al,

Please allow me some time to review the files and I will get back to you as soon as possible. Thanks!

Regards,
Elena Tsvetkova
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Elena
Telerik team
answered on 21 Mar 2017, 03:50 PM
Hi Al,

Thanks for allowing me some time. 

Luckily the tested application is public accessible and I managed to investigate the issue in details.

There are some specifics to keep in mind in automating this application. First of all is that the data in the dropdown for example is dynamically generated while typing with ajax requests. Probably there are other similar requests across the application and therefore you might need to use the ajax timeout (please refer to the screenshot) whenever there are such dynamically loaded elements. 

Second important thing is that the automatically generated find expression might not be the most suitable one and you might need to modify it. In this particular case the initially recorded find expression for the element from the drop down included the html tag <a> and the TextContent property. However due to the application specifics and how the elements in the dropdown are generated the TextContent property could be different. After inspecting the element in the recorder DOM explorer I noticed that the InnerText property contains the whole string presenting the name of town, state and country and this will be always the same. 

Then I modified the find expression and the execution is successful. Please find attached the sample test and double check the find expression of the drop down item and note the ajax timeout in the type step along with SimualteRealTyping. 

I hope the above information will be useful for you. 

Regards,
Elena Tsvetkova
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Al
Top achievements
Rank 1
Answers by
Al
Top achievements
Rank 1
Elena
Telerik team
Share this question
or