SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Nov 2001
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Escaping special characters in HtmlTextField captions...

    Hi all,

    I have a dynamically generated form, which I read and fill using Silk (and a call to the DB to determine which of the fields are required). However, I have recently run into an issue with captions and characters that Silk reserves, like * and $.

    -------

    For example:

    First Name:* [input field]

    ... shows up in Silk with the following properties:

    Caption: *
    Name: HtmlTextField ("?[1]")

    -or-

    Donation Amount: $[Input Field]
    reads as:

    Caption: $
    Name: HtmlTextField ("?[18]")

    ----------

    I understand, more or less, why it is doing this... ie. that these characters are reserved, so it has issues parseing them. However, is there any way to instruct Silk to essentially ignore the special characters? (something similar to how the pre and /pre tags in HTML keep it from trying to render whatever is within them)

    Due to the ridiculously dynamic nature of the form, (which fields display, the names of those fields, the order in which they display, and whether or not they are required, just to name a few options), I am essentially stuck mapping the display_name stored in the database to the caption being used on the page.

    Thanks in advance,
    Chris

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


    [This message has been edited by ctullbane (edited 06-11-2002).]

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

    Re: Escaping special characters in HtmlTextField captions...

    Try escaping them with a second double-quote like this:

    Name: HtmlTextField (""?[1]")


    John


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

  3. #3
    Junior Member
    Join Date
    Nov 2001
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Escaping special characters in HtmlTextField captions...

    Thanks for the reply.... however, the issue is not so much in dealing with the characters once they reach me... it's with what I can or cannot do to get Silk to read the form correctly.

    To use my first example,

    HTML:
    First Name:* [input field]

    Silk:
    Caption: *
    Name: HtmlTextField ("?[1]")

    What I want is for Silk to be returning
    Caption: First Name:*
    Name: HtmlTextField ("First Name:*)
    like it is on the page.

    The problem with just adapting my scripts to use the "?[n]" it currently returns is that n seems to equate to the numbered occurrence of that special character. So 3 fields with asterisks in their name return as ("?[1]"), ("?[2]"), and ("?[3]"), respectively. Given that the form is dynamic, and I therefore won't know the position or order of the fields, I have to know their respective 'actual names' in order to fill them out intelligently.

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

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

    Re: Escaping special characters in HtmlTextField captions...

    Switch to DOM and you can have completely unique tags for each field, regardless of
    the text nearby or what order they appear.

    If you have cooperative developers, you can ask them to give specific table cells unique DOM Tags using ID= and NAME= tags in the HTML. Some companies have had great experiences with SilkTEst and web pages when developers are willing to make small changes to make things recognizable to SilkTest.

    DOM Tag Examples:

    $FirstName
    $City
    $OptionMail3

    Hope this helps!


    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.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 02:01 PM.

Copyright BetaSoft Inc.