SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Jul 2009
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to find a index/name of a link in table cell

    I have a table in which in one column which has members. The column displays the member name underneath which has show details and on click of that it displays 'set up reminders' lnk,lnk2,lnk3,lnk4 and so on. I'm able to click on the links using

    Set objLink = Broswer("").Page("").WebTable("").ChildItem(RowNum ber,ColumnNumber,"Link",IndexvalueOfTheLink)
    objLink.Click

    but my problem is when some members have reminders they come up in between these links and the index is changing and my script is failing. so how to capture the index on the run time.

    Thanks in advance. Let me know if im not clear.

  2. #2
    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: How to find a name of a link in table cell

    Use

    objLink.GetROProperty("outerText") to get the text and see which one you want to click

  3. #3
    Member
    Join Date
    Jul 2009
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to find a name of a link in table cell

    Thanks tarun..But was wondering is there a way to find out no of links in a cell in a table....as i have lots of links in a cell and i need to find out as per the req..

    I tried using the descriptive program to get links in a table but not sure how to get them for a cell...

    Set linkDescObj=description.Create()
    linkDescObj("micclass").value="Link"
    Set Links=browser("").Page("").WebTabe().ChildObjects( linkDescObj)
    NoOfLinks=Links.count()
    msgbox NoOfLinks
    For i=0 to NoOfLinks-1
    linkName=Links(i).getROProperty("name")
    msgbox linkName
    Next

    but how to get no of links in a cell as i use getcelldata after webtable its giving error...

  4. #4
    Senior Member
    Join Date
    Jun 2007
    Location
    IL, US
    Posts
    408
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to find a name of a link in table cell

    Msgbox Browser("").Page("").WebTable("").ChildItemCount(R ow, Column, MicClass)

  5. #5
    Member
    Join Date
    Jul 2009
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to find a name of a link in table cell

    Thank you Autotester works fine...

  6. #6
    Junior Member
    Join Date
    Feb 2010
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to find a name of a link in table cell

    If you want to click a link which exist in Webtable Cell,
    Use "ChildItem" event to retrieve the child Link objects in
    that cell.

    Broswer("Bname").Page("PTitle").WebTable("WTName") .ChildItem
    (RowNumber,ColumnNumber,"Link",IndexvalueOfTheLink )
    Link Index value depends on the Position of the link in
    that cell.

    'If the cell has only one Link, then index value will be
    Zero. i.e.
    Set objLink = Broswer("Bname").Page("PTitle").WebTable
    ("WTName").ChildItem(1,2,"Link",0)
    objLink.Click

    'If Cell has three links and if u want to click on Second
    link, then pass index value as 1(one). i.e.
    Set objLink = Broswer("Bname").Page("PTitle").WebTable
    ("WTName").ChildItem(1,2,"Link",1)
    objLink.Click -- so that it will click on second link in
    the specified web table cell.

  7. #7
    Member
    Join Date
    Jul 2009
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to find a name of a link in table cell

    Thanks Ayan...But if you look my question I'm able to get the index as you mentioned but my question was how to get the value of the indexes for the links at runtime so I had to use

    NoOfLinks = Browser("").Page("").WebTable("").ChildItemCount(R ow, Column, "Link")

    and then keep check till objLink.GetROProperty("outerText") = "the name of the link which you are searching for"

    so using these i was able to resolve this....

 

 

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 7.14%
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 04:35 AM.

Copyright BetaSoft Inc.