How could I set ELSE statement empty

3 posts, 1 answers
  1. algot
    algot avatar
    57 posts
    Member since:
    Nov 2011

    Posted 23 Jan 2012 Link to this post

    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. Answer
    Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 23 Jan 2012 Link to this post

    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
  3. algot
    algot avatar
    57 posts
    Member since:
    Nov 2011

    Posted 23 Jan 2012 Link to this post

    Thank you very much. Test is working as I expect.
Back to Top