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

How to verify if a login dialog exist or not

4 Answers 28 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Y
Top achievements
Rank 1
Y asked on 24 Feb 2014, 03:26 AM
Hi, Support

  My scenario is to validate 400+ urls redirection.
  One question here is, only the 1st url need to login with username and password. The following urls do not need.

 So I want to add a step to verify if the dialog exist or not.
 If exists, eg. 1st url, then enter the username and password.
 If not, go next.

 How to make it? Will you please give a solution?
 Thanks.

Another related thread is 'Can a url be parameterized and verified?'

4 Answers, 1 is accepted

Sort by
0
Y
Top achievements
Rank 1
answered on 26 Feb 2014, 06:21 AM
For those don't need login scenarios, as the login step is not skipped, all are failed, with error message:

Failure Information: 
~~~~~~~~~~~~~~~
Timed out waiting '5000' msec. for any dialog to be handled '1'
InnerException:
System.TimeoutException: Timed out waiting '5000' msec. for any dialog to be handled '1'
   at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilAnyHandled(IEnumerable`1 dialogs, Int32 handleCount, Int64 timeoutMilliseconds, Boolean resetHandleCount)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DialogHandlerDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DialogHandlerDescriptor.Execute(IAutomationHost browser)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
0
Boyan Boev
Telerik team
answered on 27 Feb 2014, 07:38 AM
Hi,

Thank you for contacting us.

Instead of verifying whether the dialog exists, create a parent test which will contain 2 tests as steps. The first test as step will be the verification for the first URL and the log in scenario. The second test as step will be databinded for all other 399 verifications.

When you run this parent test the fist step (the test as step with the verification of the first URL and log in scenario) will be executed only once and then the second step (test as step with the other 399 verifications) will be executed 399 times.

Let me know if this helps.

Regards,
Boyan Boev
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Y
Top achievements
Rank 1
answered on 27 Feb 2014, 08:02 AM
Great idea.
I will try later.

Thanks Boyan.
0
Boyan Boev
Telerik team
answered on 27 Feb 2014, 11:18 AM
Hello,

Please take your time and update the ticket accordingly.

Thank you!

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