SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Jul 2000
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HtmlTextFields and the \"&\" symbol

    Bear with me ...

    I have a simple HTML page that contains the links:

    abc&123
    foo
    &

    When I call BrowserPage.GetChildren() on this, I get 3 HtmlTextFields --

    abc123
    foo
    ^foo

    As you can see, the "&" symbol is getting ignored by Silk.

    The problem is, I REALLY WANT to be able to code calls like HtmlTextField("abc&123").GetContents() and HtmlTextField("&").GetContents().

    What I'm trying to avoid is having a script writer fire up the recorder to get the "magic" tags to reference.

    Has anyone else encountered this / found a suitable workaround?

    I'm using Silk 5.5 HF 4 / IE 5.5 / DOM.

    Thanks!

    --- Can't get the silly HTML file to attach, so here's the content:
    <A HREF="http://www.yahoo.com"><NOBR>abc&123</NORBR>
    </A>
    <A HREF="http://www.yahoo.com"><NOBR>foo</NORBR>
    </A>
    <A HREF="http://www.yahoo.com"><NOBR>&</NORBR>
    </A>

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

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlTextFields and the \"&\" symbol

    Brent,

    SilkTest will always throw away ampersands. I don't think you can change that.

    Here's one option.

    aeweb3.inc at automationexpertise.com contains a function LinkPathClick (sPath). you can pass it a partial URL of the link to click. It will search the links on the page until it finds one which matches the sPath you have specified.

    Example:

    Link is: abc&123
    URL is: http://www.whatever.com/test/me.asp

    In your script:

    LinkPathClick ("/test/me.asp")
    or any partial but unique part of of the URL.
    will click the link.

    If you're using DOM, you should be able to use the DOM tag "$whatever" to refer to the object.

    Email me if you need more info.

    Hope this helps

    ------------------
    John W Green
    jwgreen@automationexpertise.com http://www.automationexpertise.com

    [This message has been edited by John Green (edited 06-07-2002).]

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlTextFields and the \"&\" symbol

    ... duh, brent ...

    Thanks, John. I'm already using your library and COMPLETELY forgot about the LinkPath stuff ...

    Nothing like spending a couple of hours with your blinders on ...



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

 

 

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 02:14 PM.

Copyright BetaSoft Inc.