SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4

Thread: Dynamic Objects

  1. #1
    Junior Member
    Join Date
    Sep 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Dynamic Objects

    Hi,

    I have a scenario where there are 100 or more names are there in a webpage where all are dynamic links, exactly I have to click the link where the name is equal to "XYZ".

    So, how can I handle the above scenario? Please assist me in this regard.

    Thanks in advance,
    Pravs.

  2. #2
    Member
    Join Date
    Apr 2007
    Location
    Toronto ,Canada
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Objects



    Hi pravsworld,

    Here the solution for your query :

    I am giving sample code :
    ********************************************

    TestObject[] foundTOs;
    foundTOs = table_report().getMappableChildren();
    TestObject to = null;
    for (int i = 0; i < foundTOs.length; i++) {
    if ((foundTOs[i].getProperty(".text").toString().trim() == "xyz".trim())) {

    to = foundTOs[i];
    ((GuiTestObject) to).click();
    break;
    }
    }

    ************************************************** *********

    table_report() must be immideate parent of testObejct(the object you are going to click)

    make sure that comparisionof two string should be true.


    Thanks
    ------
    kyatham

  3. #3
    Junior Member
    Join Date
    Nov 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Objects

    If the text of the object is also dynamic?? then how to click that object??

    I mean, suppose there is a table which contains the list of teams playing cricket,hockey,football....

    The list is dynamically varying and you need to click the link which ever is in the first row, last column. we can't recognise the object with its properties as every object will have same properties like Html.A, Tag=A, .....
    and we canot take the text to recognise the object.

    Any clues on this?

  4. #4
    Member
    Join Date
    Oct 2007
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Dynamic Objects

    How would you then identify the field that you want to click?

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 02:22 PM.

Copyright BetaSoft Inc.