SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Super Member
    Join Date
    Jul 2003
    Location
    Boulder, CO
    Posts
    1,276
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Iterate through all \'unpredictable\' links on a page?

    Hi,

    Does anyone know a way of sifting through a webpage's links without really knowing what to expect on the page in terms of format, layout, and such. As each link is 'tested' working ones are saved to a list, array, or something.


    Basically, is it possible to do something like:

    window BrowserChild somePage
    sURL = "http://this.part.I/know"
    tag "whatever"
    parent Explorer

    INTEGER index, goodindex
    Array[10] of INTEGER goodLinks

    goodindex=1
    for index=1; index<10; index++
    do
    loadpage somePage.sURL
    somePage.{link#1}.Click
    except
    if ExceptNum == E_NOT_FOUND_OR_WHATEVER
    continue
    else
    goodLinks[goodindex] = somePage.{link#1}.GetText
    goodindex++
    continue

    Any ideas or suggestions are greatly appreciated!

    Chris
    Chris R Mead

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Iterate through all \'unpredictable\' links on a page?

    This is do-able in the manner you might use to investigate the rooms behind the mystery doors in an adventure game: Recursively treat each link as a door, open it, and inventory the objects and links found within. Repeat with either a breadth first (check every door in the first room, then move to the next room) or depth-first (check every left door in the next room until your run out of left doors)algorithm.

    One issue comes up rather quickly though. How do you know the results are correct? One possibility might be to bench check the original results manually with whatever spec' you have available then use them to compare the results of the next run. Differences in the form of new or missing doors can be reported.

    This idea has been discussed at length before in QAForums; maybe someone else knows of a link to an operable code example.


    John

  3. #3
    SQA Knight
    Join Date
    Sep 2001
    Location
    Bangalore,India
    Posts
    2,549
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Iterate through all \'unpredictable\' links on a page?

    Hi,
    If you want to test the links, you can go for Linktester. It is very good utility/feature. You can test upto some depth (directory wise) of the site. You can write script or you can use Linktester utility... For me, scripting is better. You can prepare report in your style..

    It will be working for HTTP and not implemented for HTTPS..
    Thanks & Regards,
    Palani.
    http://tips-testing.blogspot.com/index.html
    Quote: Donít hesitate to initiate!

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Iterate through all \'unpredictable\' links on a page?

    Because linktester does not support HTTPS (that's SO lame) I wrote a recursive routine to walk links in this way. It is VERY raw and not particularly reliable in its current state. I was having a difficult time with redirects. It is too big to post here, but if you would like to use it as a template to modify for your needs (it's specific to our web site) I'll email it to you.

    If you want to look at it, drop me a line at zbelfdink@hotmail.com

  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)
    Total Downloaded
    0

    Re: Iterate through all \'unpredictable\' links on a page?

    I wrote a link checker/spider for SilkPerformer that runs a lot faster. May be able to adapt it to work with any application. Nice that it checks links, graphics, HTTPS....

    - Dave
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  6. #6
    Super Member
    Join Date
    Jul 2003
    Location
    Boulder, CO
    Posts
    1,276
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Iterate through all \'unpredictable\' links on a page?

    John, Palani, DJGray, & Dave,

    Thank you all for your suggestions. I am currently playing with .GetLinks() which can be called on a window and am checking to see how hard it will be to filter out the links that I actually want. Do any of you know how to refer to a table on a page with SilkTest? This way I might be able to call .GetLinks on it and have less to sift through.

    I will post my results when something is working.
    Chris R Mead

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

  7. #7
    Super Member
    Join Date
    Jul 2003
    Location
    Boulder, CO
    Posts
    1,276
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Iterate through all \'unpredictable\' links on a page?

    .GetLinks() worked perfectly. If anyone wants sample code or something let me know...
    Chris R Mead

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

  8. #8
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Iterate through all \'unpredictable\' links on a page?

    Hey Chris, post away. Even if those reading today don't have a use for it, someone in the future may find it useful.

    Thanks!

  9. #9
    Super Member
    Join Date
    Jul 2003
    Location
    Boulder, CO
    Posts
    1,276
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Iterate through all \'unpredictable\' links on a page?

    How do I get around this error message when I post:

    Sorry, we do not permit the following HTML tag or attribute: Parenthesis in HTML tag

    If I take all the parentheses out the code is pretty confusing.

    Chris
    Chris R Mead

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

  10. #10
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Iterate through all \'unpredictable\' links on a page?

    Chris,

    For instructions, click on the "UBB code is enabled" link in the lower left hand corner. Then scroll down to "Code Tag".


    John

 

 
Page 1 of 3 123 LastLast

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 08:20 AM.

Copyright BetaSoft Inc.