SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Sep 2001
    Location
    Los Angeles, CA
    Posts
    65
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Select a number from the list with Silk Test

    I have a question.
    Lets say that i have pages and numbers are links:
    Page: | [1] | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    Every time i create new date the number of pages increases.
    What i need to do in order for Silk Test to click on the last page number?
    Please give an example.

    ------------------

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Select a number from the list with Silk Test

    I'd have to have a better understanding of what those numbers are when Silk looks at them. In theory, I'd read them into a list and use ListCount. Then you can click the last item in that list.

    ------------------

  3. #3
    Member
    Join Date
    Dec 2001
    Location
    chennai,TN,India
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Select a number from the list with Silk Test

    Have a ini file for storing the count of the pages.Whenever u have a new date, open the ini file,increment the value of the page count.When you want to click on the last created page, get the value from the ini file and use the @ operator to click on the link.U can also try this one to click on the link. HtmlLink("#{lastpageid.GetIndex()}").Click())

    ------------------

  4. #4
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Select a number from the list with Silk Test

    You can use GetChildren () on a page, find all the links and then pick the link with the highest number.

    Another way is to do this:
    If you know what the highest number could possibly be then you could add this method to the page's window declaration and call it in a script:


    ClickHighestLink ()
    //change for higher if needed
    INTEGER i, iHighestNumber = 31

    for i = iHighestNumber to 1 step -1
    if (HtmlLink ("{i}").Exists ())
    HtmlLink ("{i}").Click ()
    return

    RaiseError (1, "No link found between 1 and {iHighestNumber}")

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

    [This message has been edited by jamesso (edited 03-21-2002).]

  5. #5
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Select a number from the list with Silk Test

    Your test is too random, and I am not sure what you are testing.

    Let's say in a deterministic way.

    1)Get total total # of page(some work here)
    2)Keep track of when you add a page
    3)Now you always know what is your last page.

    There must be a pattern on how your page links works. Maybe there is even a special variable name for the last page. Or maybe there is already a last page link(button) you can grab. Last if all fails try the above suggestions Always look for the easy answer first.

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:25 PM.

Copyright BetaSoft Inc.