SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Sep 2002
    Location
    Garden Grove, CA, USA
    Posts
    49
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to refer to the item in the LIST??

    LIST lsLinks = {...}
    "topLogin"
    "topAccount"
    "topHelp"

    INT i
    for (i=1;i<=3;i++)
    MyPage.lsLinks[1].click()

    How do I refer the item in the LIST?.. I want to do something as below:

    MyPage.topLogin.click()
    MyPage.topAccount.click()
    MyPage.topAccount.click()

    Can I do something above with the LIST.
    Please email to nguyen_henry@yahoo.com
    Thanks,



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

  2. #2
    Senior Member
    Join Date
    Jan 2002
    Location
    Des Moines, Iowa
    Posts
    289
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to refer to the item in the LIST??

    You have got the right idea,

    Now lets just refine it a bit. You may know that you can make a list out of about any datatype. As far as I know you can only perform methods on window datatypes. (Somebody, If I am wrong please pipe up.)

    So lets make sure you are creating a list of window.
    You will be using the window identifiers from you include file. Doing it this way you will have to use the whole path to the object including the page.
    So you see, you will not have the Window object linked to a list. You will just have the list.

    You could also do a GetChildren method on the web page. That will return all the objects and links on the page in the form of a list of window. You could then move through the list and find the links and click them.

    This is especially nice when you don't know what you will find on the page. But you need to make sure all the links fire. You can get as complex as you need with this method to accomplish the task. But this is the base concept to get you started.
    ------------------


    [This message has been edited by blacst (edited 09-07-2002).]

  3. #3
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to refer to the item in the LIST??

    Replace:

    MyPage.lsLinks[1].click() // one ???

    with:

    MyPage.lsLinks[i].click() // note "i"


    John




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

 

 

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 10:59 AM.

Copyright BetaSoft Inc.