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

How could I set ELSE statement empty

2 Answers 76 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
algot
Top achievements
Rank 1
algot asked on 23 Jan 2012, 10:37 AM
I need to check page status by if...else statement.
I use following way:http://screencast.com/t/Lgs2YIJlg2l
If "logout" link is visible I click it to logout user.
But if "logout" is absent I shouldn't do anything, but this test is failed
Unable to locate element. Details: Attempting to find [Html] element using
Find logic
 (Html): [id 'Exact' header_0_ctl00_ctl02_logout] AND [tagname 'Exact' a]
 
Unable to locate element. Search failed!

2 Answers, 1 is accepted

Sort by
0
Accepted
Plamen
Telerik team
answered on 23 Jan 2012, 10:49 AM
Hi Alexander,

Try to change the verification in the IF statement to "Verify Exists" instead of "Verify is Visible". Please check this article to see how you can do that.

Let me know if you require further assistance.

Regards,
Plamen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
algot
Top achievements
Rank 1
answered on 23 Jan 2012, 10:54 AM
Thank you very much. Test is working as I expect.
Tags
General Discussions
Asked by
algot
Top achievements
Rank 1
Answers by
Plamen
Telerik team
algot
Top achievements
Rank 1
Share this question
or