Results 1 to 2 of 2
  1. #1

    iterate until link is disabled


    i want to iterate few statements until the link is disabled.

    In my application there are footer links first,previous,next,last

    my aim is to search for an element until the next link is disabled.

    plz help me write the script for that...

    i identified the properties of the object link using object spy...

    It identifies Next as link when there are next pages available and when there are no pages available it's capturing the entire footer links section as webelement.i.e i am not able to select only 'Next' link when it is disabled.

    I tried using this way..but it didnot work out..
    If browser("Browser").Page("Inbox - Yahoo! Mail").link("From").Exist then
    browser("Browser").Page("Inbox - Yahoo! Mail").link("From").Click
    Do while (browser("Browser").Page("Inbox - Yahoo! Mail").Link("Go to Next page").checkproperty("Class Name","Link")=True)
    if(browser("Browser").Page("Inbox - Yahoo! Mail").webelement("YYYY").Exist Then
    browser("Browser").Page("Inbox - Yahoo! Mail").link("xxx").Click
    browser("Browser").Page("Inbox - Yahoo! Mail").Link("Go to Next page").Click
    end if
    End if

    but it didnot work and threw me the error at check property-
    Actual value of class name-''
    expected value of class name-link
    so the object does not match..may be the runtime properties didnot match..

    Moderator comments: do not "scream" with crap phrases like "--help me!!", as this is not compliant with the forum guidelines.

  2. #2

    Re: iterate until link is disabled--hlp me!!

    Doesn't look like you're getting an error, checkproperty is just doing what it's supposed to and failing the test when the property doesn't match.

    Try GetROProperty instead.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 03:45 PM.

Copyright BetaSoft Inc.