SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Oct 2001
    Location
    Dublin
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Html Tables - how to get to a row

    Hi
    I'm using SilkTest 5.0.3 and I am testing on Netscape 4.5.
    I have a table which contains a fixed number of columns and a variable number of rows. I want to be able to go to a specific row and click on the link within that cell.
    I can get to the column I want but can't seem to get to the row I want.
    I tried (as in another posting on this site)
    [ ] MMSCInbox.HtmlTable1.HtmlColumn2.HtmlLink("#{1}"). Click ()
    Where (#{1}) => row one (?????) but it doesn't seem to be able to see any links - I got the following message when I ran the script.
    [ ] *** Error: Window '[HtmlLink]#1' was not found
    [ ] Occurred in MMSCInbox.HtmlTable1.HtmlColumn2.HtmlLink("#1")::C lick


    When I declare the window SilkTest doen't 'see' any links within the columns - shd it ?????
    Anyone know a way of doing this ????

    Thanks
    Jerrie


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

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Html Tables - how to get to a row

    Jerrie,
    What about if you try the following:

    The above should print out what SilkTest sees at runtime inside of the table column.

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  3. #3
    Member
    Join Date
    Oct 2001
    Location
    Dublin
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Html Tables - how to get to a row

    Hi Dave
    Thanks for the reply.
    However when I try this I get
    [ ] *** Error: Function GetColumnCount is not defined for window MMSCInbox.HtmlTable1.HtmlColumn2
    any ideas ????




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

  4. #4
    Member
    Join Date
    Oct 2001
    Location
    Dublin
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Html Tables - how to get to a row

    I also tried the following
    [ ] WINDOW wCol = MMSCInbox.HtmlTable1.HtmlColumn2
    [ ] INTEGER i, iRows
    [ ]
    [ ] ListPrint (wCol.GetFormattedText ())
    [ ] iRows = MMSCInbox.HtmlTable1.GetRowCount ()
    [ ]
    [-] for i = 1 to iRows
    [ ] Print (wCol.GetRowChildren (i))
    [ ]
    [ ] // should click the last link
    [ ] wCol.HtmlLink("#{iRows}").Click ()

    And I get
    [ ] *** Error: Window '[HtmlLink]#1' was not found
    [ ] Occurred in MMSCInbox.HtmlTable1.HtmlColumn2.HtmlLink("#1")::C lick



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

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Html Tables - how to get to a row

    Er...my bad. I meant GetRowCount. Sorry 'bout that.

    When you do that loop routine with GetRowChildren, what objects are being seen for the column?

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  6. #6
    Member
    Join Date
    Oct 2001
    Location
    Dublin
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Html Tables - how to get to a row

    Hi Dave
    Thanks for replying.

    Here's the code I have now
    [ ] iOriginalRowCount = MMSCInbox.HtmlTable1.GetRowCount ()
    [ ] Print("Number of msgs - {iOriginalRowCount}")
    [ ]
    [ ] WINDOW wCol = MMSCInbox.HtmlTable1.HtmlColumn2
    [ ] INTEGER i, iRows
    [ ]
    [ ] ListPrint (wCol.GetFormattedText ())
    [ ]
    [-] for i = 1 to iRows
    [ ] Print (wCol.GetRowChildren (i))
    [ ]
    [ ] // should click the last link
    [ ] wCol.HtmlLink("#{iRows}").Click ()


    And here's the results
    [ ] Number of msgs - 3
    [ ] =====================================
    [ ] Fri, 16 Nov 2001 16:49:39 +0000 (GMT)
    [ ] -------------------------------------
    [ ] Fri, 16 Nov 2001 16:51:44 +0000 (GMT)
    [ ] -------------------------------------
    [ ] Fri, 16 Nov 2001 16:57:17 +0000 (GMT)
    [ ] =====================================
    [ ] {}
    [ ] {}
    [ ] *** Error: Window '[HtmlLink]#3' was not found
    [ ] Occurred in MMSCInbox.HtmlTable1.HtmlColumn2.HtmlLink("#3")::C lick
    [ ] Called from View_Attatchment at us_072_003.t(65)


    Jerrie



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

  7. #7
    Member
    Join Date
    Nov 2000
    Location
    Tampa, FL USA
    Posts
    90
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Html Tables - how to get to a row

    >> declare the window SilkTest doen't 'see' any links within the columns - shd it ?????

    ------------
    you need to do a classof() to see what they are , if silktest isn't seeing them as links (since they are not underlined text), then what is it seeing them as???
    do a:
    Print (wCol.GetRowChildren (i))
    Print (ClassOf(wCol.GetRowChildren (i)))
    or get the 'aeweb.inc' file from automation extertise which can be found in the downloads section of this forum and there are lots of functions to help you find your links.


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

  8. #8
    Member
    Join Date
    Oct 2001
    Location
    Dublin
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Html Tables - how to get to a row

    Thanks Janek
    I found something in aeweb.inc that I could make work for 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
  •  

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 05:57 AM.

Copyright BetaSoft Inc.