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

security certificate - there must be a better way

2 Answers 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Asare
Top achievements
Rank 1
Asare asked on 11 Oct 2012, 09:53 AM
Test Studio does not allow you to test for a non existent DOM

Which makes testing for security certificate page  difficult.

My approach is to use a logical condition (if...else)



However, this only works when the page is displayed. If the page is not displayed essentially the step fails regardless what ever the else statement says.

To get around the failing else I use the "Continue on Failure "

There must be a better way. I have looked at coding but the same issue persists.

Any suggestions?

2 Answers, 1 is accepted

Sort by
0
Accepted
Mario
Telerik team
answered on 11 Oct 2012, 06:43 PM
Hello Asare,

Thank you for contacting Telerik Support.

If you would benefit from avoiding this certificate message altogether, please see how to register a security certificate with TestStudio from our online documentation.

As far as your logical condition, I believe your issue stems from the Verify condition itself. Currently you are comparing 'TextContent' to contains the expected text. If the security certificate page pops up then 'TextContent' will exist and be compared to contain the text and hence your step will pass. However if you do not come to the security certificate at this point 'TextContent' will not exist at all and your Verify will fail the step as it cannot find the element to compare its content. If you were to change the Verify in your logical IF to check Verify  'TextContent'  Exists (or another element) then it would properly go to your ELSE statement when it does not see the item. If you wish you could Verify 'TextContent' Contains after determining it exists at all. 

Let me know whether this solution works for you.

Greetings,
Mario
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
0
Asare
Top achievements
Rank 1
answered on 16 Oct 2012, 11:51 AM
I have tested it using Wait for ..
Tags
General Discussions
Asked by
Asare
Top achievements
Rank 1
Answers by
Mario
Telerik team
Asare
Top achievements
Rank 1
Share this question
or