SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Mar 2006
    Location
    Bristol, UK
    Posts
    1,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Referencing objects by WebTable position

    Hello,

    My application has several WebTables which within its cells exist WebEdit, WebLists, WebButons, etc..

    In Descriptive Programming, is there a way of calling their methods by referencing their row & column position rather than properties?

    I envisage it might be something like this;

    Browser(oGenBrw).Page(oGenPge).WebTable(oDataTable ).WebList(oRow, oCol).Select "AAAAA"

  2. #2
    Senior Member
    Join Date
    Mar 2006
    Location
    Bristol, UK
    Posts
    1,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Referencing objects by WebTable position

    Hang on, just did a more extensive search of the forum, and I think it's been answered in the past!

  3. #3
    Senior Member
    Join Date
    Mar 2006
    Location
    Bristol, UK
    Posts
    1,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Referencing objects by WebTable position

    Lets track back!

    In a previous post, Tarun said;

    "WebTable(...).object.rows(0).cells(0).click

    will click on 1,1 "

    I can't get this to work.

    Any chance of a reall life example Tarun?

    Is "object" an actual description object or a keyword or should it be replaced with the Class Name?

  4. #4
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Referencing objects by WebTable position

    Are you getting any error or what? What are you trying to achieve? This is generic code and should work well when click event is of importance

  5. #5
    Senior Member
    Join Date
    Mar 2006
    Location
    Bristol, UK
    Posts
    1,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Referencing objects by WebTable position

    There is a clickable image in a table (row 7, col 2).

    I want to click this without refering to properties of the image but to its position in the webtable instead.

    I've tried this to no effect;

    Browser(oGenBrw).Page(oGenPge).WebTable(oTable1).I mage.row(6).cells(1).Click

    Should this work?

  6. #6
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Referencing objects by WebTable position

    Robbie I'm not sat at a QTP enabled machine right now but I thought Webtable rows start at 1 not 0.

    Might be wrong but I'm pretty sure tables (incl. DataTable) work this way.

    Mark Smith.

  7. #7
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Referencing objects by WebTable position

    There is difference in clicking a cell and a image inside it


    Browser(oGenBrw).Page(oGenPge).WebTable(oTable1).C hildItem(7,2,"Image",0).click

  8. #8
    Apprentice
    Join Date
    Aug 2009
    Location
    India, Chennai
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Referencing objects by WebTable position

    Thanks Veteran the above code is working. Got a timing help

 

 

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 11.54%
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:46 AM.

Copyright BetaSoft Inc.