SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Mar 2007
    Location
    Atlanta, GA
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Cant select second row in table

    I can't seem to select a table row other than the first row.

    The code below displays the correct data that is in the table, but the Obj2.Click call fails with a "Object required: 'Obj2'" error.

    Any help would be appreciated.


    T = Browser("Browser").Page("MT: Profile_10").Frame("display").WebTable("Active").G etCellData(1,1)
    Print T
    T = Browser("Browser").Page("MT: Profile_10").Frame("display").WebTable("Active").G etCellData(2,1)
    Print T

    ' This click works
    Set Obj = Browser("Browser").Page("MT: Profile_10").Frame("display").WebTable("Active").C hildItem(1,1, "WebElement",0 )
    Obj.Click
    Browser("Browser").Sync


    Set Obj2 = Browser("Browser").Page("MT: Profile_10").Frame("display").WebTable("Active").C hildItem(2,1, "WebElement", 0)
    Obj2.Click ' <-- This fails
    Browser("Browser").Sync

  2. #2
    Member
    Join Date
    Jan 2007
    Posts
    472
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Cant select second row in table

    Before clicking, try to highlight the object and see if the object actually exist or not in the page.

  3. #3
    Member
    Join Date
    Oct 2003
    Location
    Norfolk, VA
    Posts
    360
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Cant select second row in table

    Try this:

    <font class="small">Code:</font><hr /><pre>
    var = Browser("Browser").Page("MT: Profile_10").Frame("display").WebTable("Active").G etCellData(2,1)
    'Print T
    Set Obj = Description.Create
    Obj("innertext").Value = var

    Browser("Browser").Page("MT: Profile_10").Frame("display").WebElement(Obj).Clic k
    Browser("Browser").Sync </pre><hr />

    I used it on similar site in-house here and it worked.
    A good rule of thumb is to never measure with your thumb.

  4. #4
    Junior Member
    Join Date
    Mar 2007
    Location
    Atlanta, GA
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Cant select second row in table

    Thanks Steve, that worked!

 

 

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.71%
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 11:43 AM.

Copyright BetaSoft Inc.