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

Alert dialog box does not appear while executing test

4 Answers 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gaurav
Top achievements
Rank 1
Gaurav asked on 10 Dec 2013, 07:26 AM
Hi,

I am facing a problem regarding Alert Dialog. While recording, when i enter a mobile number on Mobile field textbox and click anywhere on the form an Alert Dialog Box appears. Click anywhere is recorded on telerik as Click 'Div'. But when i run the same test and when it reaches on Click 'Div' it fails. Telerik unable to find the Click 'Div'.

NOTE: Alert Dialog appears after i click anywhere on the form.

I have attached the failure info also.

Failure Information: 
~~~~~~~~~~~~~~~
Unable to locate element. Details: Attempting to find [Html] element using 
Find logic 
 (Html): [TagIndex 'Exact' div:62]

Unable to locate element. Search failed!

Learn more about finding elements here:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/troubleshooting_guide/test-execution-problems/unable-to-locate-element.aspx

Waiting for your response

4 Answers, 1 is accepted

Sort by
0
Velin Koychev
Telerik team
answered on 13 Dec 2013, 08:23 AM
Hello Gaurav,

I am sorry to hear that  you are experiencing this issue.

It seems that Test Studio is not able to locate the element that you click on. We have an article in our documentation about this issue that you might find useful. 
It is a good practice when creating your tests to put some wait steps before the elements you might experience problems with. The best way to proceed here is to add a wait for exist step which will refreshes the DOM tree. Here is a short video demonstration (no audio) on how you can add a wait for exists for an element in already recorded test.

It might also be helpful reading our article about using chained find expressions and also watching this short video that will show you some good practices and how you can make your tests more flexible and robust.

If you continue to experience problems, please provide us with a copy of your test and if it is possible grant us access to your application so we can reproduce the issue on our end and give you a solution. If you decide to do so please make sure you open  a support ticket instead of forum thread where all the information provided remains confidential.

Looking forward to hearing from you.

Regards,
Velin Koychev
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Alan
Top achievements
Rank 2
answered on 13 Dec 2013, 05:14 PM
It seems like clicking off the field is necessary only to invoke the OnBlur method of the mobile number textbox.  We have forced this behavior in either of the following ways successfully:

- Use the JavaScript Events button in the Elements menu to insert an OnBlur step in your test.
- Record the typing of the "Tab" key at the end of entering the phone number in the textbox.  You may need to enable the SimulateRealTyping property for the that test step.

Hope that helps!
Alan

0
Velin Koychev
Telerik team
answered on 18 Dec 2013, 11:14 AM
Hi Alan,

Thank you for sharing your experience and solution. I've updated your Telerik points.
 
Regards,
Velin Koychev
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Alan
Top achievements
Rank 2
answered on 18 Dec 2013, 12:34 PM
Cool!  Thank you!

Alan
Tags
General Discussions
Asked by
Gaurav
Top achievements
Rank 1
Answers by
Velin Koychev
Telerik team
Alan
Top achievements
Rank 2
Share this question
or