SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Dec 1999
    Location
    San Mateo, CA, USA
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Elegant work-around for missing HtmlLinks in Netscape

    When testing any sites that have links that aren't underlined through Netscape, you may have noticed that Silktest either recognizes them as HtmlText or HtmlHeading depending on whether or not the text of the link has a Bold style. This is because Silktest makes the assumption that all HtmlLinks are underlined when testing Netscape.

    On my site we have a consistent style of help link that is also the title of an input field (and therefore context help), not underlined, and bold faced. I have tested and implemented the following approach to solving the problem of cross-browser testing of these links, and thought that it might be helpful to others frustrated with the same issue:

    I defined a class as follows:

    winclass ChkHelp : HtmlLink
    string sTag = ""
    explorer tag "[HtmlLink]{sTag}"
    netscape tag "[HtmlHeading]{sTag}"

    and instance:

    ChkHelp hkSomeLink
    const string sTag = "Tag Text"

    In this way, the minimum amount of code is changed in order to implement the work-around. Every Help style link in my web application is defined in the same way, so I simply define each using this class, and it is recognized as the same HtmlLink object in both browsers. Notice the "const" keyword on the definition of the string in the instance. This is required or the approach won't work.

    ------------------
    Craig Koozer
    QA Engineer
    NetLedger, Inc.
    Craig Koozer
    Lead Test Automation Engineer
    www.oraclesmallbusiness.com

  2. #2
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Elegant work-around for missing HtmlLinks in Netscape

    Reply by Andrew Issaenko from comp.software.testing:

    Craig, your method will work out fairly good, when you know for sure what
    objects presents on your page and do not have dynamic objects. This case,
    you can define in advance what objects are links and what are text blocks.
    If HtmlLinks, HtmlTexts and HtmlHeadings appear randomily on the page, then
    you can't differ in advance where is HtmlLinks and where HtmlText and
    HtmlHeading. This case no universal solution is available.You might have to
    solute this problem in every case separately.

    Best regards,
    Andrew Issaenko
    AJ Alhait
    BetaSoft Inc.

  3. #3
    Junior Member
    Join Date
    Dec 1999
    Location
    San Mateo, CA, USA
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Elegant work-around for missing HtmlLinks in Netscape

    Um... I'm not sure how to respond to your criticism. It sounds to me like you simply haven't run into the problem that this work-around is intended to solve.

    If you have two objects in Netscape under the same page with the same identifying text, one being a non-underlined link, and one being a simple text object, Silktest will see the first one as either an HtmlText or HtmlHeading (depending on whether or not Bold Style). Let's look at an example, and assume both are BOLD (or not), which is highly unlikely):

    BrowserPage.HtmlHeading("Some Text[1]")
    BrowserPage.HtmlHeading("Some Text[2]")

    Let's say that the second one is the link, we define them as follows:

    BrowserChild MyPage
    tag "whatever"

    HtmlLink hkSomeText
    const string sTag ="SomeText[2]"

    HtmlHeading hhSomeText
    tag "SomeText[1]"

    If you take the time to make a web page that illustrates this case, you will see that the objects will be reliably tagged as the class of object that they are in both Netscape and IE.

    Obviously we can devise cases where this approach won't always tag the items as what we want (i.e. links with dynamic tags, pages that have moving content, etc.), but you would have difficulty tagging objects reliably in these cases regardless of whether or not you used my work-around or not, and that is really a separate issue entirely.

    This is a very specific workaround for the specific problem that links within Netscape that do not have underlines are not being recognized as links. If you use my approach to identify objects that fall into this very specific subset of all objects, then it simply makes more of the default Silktest methods available for use in manipulating the link object (i.e. the GetID() method works, so you can verify the URL of the link, which you wouldn't otherwise be able to do without making your own primative to do it). Also, it allows you to cross-browser test with the same script code.

    I hope that helps.
    Craig Koozer
    Lead Test Automation Engineer
    www.oraclesmallbusiness.com

  4. #4
    Junior Member
    Join Date
    Dec 1999
    Location
    San Mateo, CA, USA
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Elegant work-around for missing HtmlLinks in Netscape

    Whoops, sorry, some editing required, the following text in my example in the previous response:

    HtmlLink hkSomeText
    const string sTag="Some Text[2]"

    needs to be changed to:

    ChkHelp hkSomeText
    const string sTag="Some Text[2]"

    Thanks!
    Craig Koozer
    Lead Test Automation Engineer
    www.oraclesmallbusiness.com

 

 

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 08:57 PM.

Copyright BetaSoft Inc.