SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Nov 2000
    Location
    NY, NY
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Tag & identifier is changed dynamically

    How could I maintenance script if identifier & tag is changed dynamically?

    HtmlText TuesdayOct102000
    tag "Tuesday Oct. 10, 2000"

    I try to declare variable and change script like (see above), but I can't declare variable in the include file.

    DATETIME DayAndTime
    string sDay1
    NewDay=GetDateTime()
    sDay=FormatDateTime(NewDay, "mmm. d, yyyy")

    HtmlText NewDate
    tag "{sDay}"


  2. #2
    Member
    Join Date
    Nov 2000
    Posts
    44
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tag & identifier is changed dynamically

    Hi,

    You cannot declare a variable and use it in the tag but what you can do is create a function and call this directly in the tag as follows:

    string GetCurrentTime ()
    DATETIME DayAndTime
    string NewDay
    NewDay=GetDateTime()
    return (FormatDateTime(NewDay, "mmm. d, yyyy"))

    HtmlText NewDate
    tag "{GetCurrentTime ()}"

    This will only work when you replay so you cannot record (no code is executed when the recorder is running). You might also change the tag to use the prior text (SilkTest will use the caption of the nearest text item).

    I hope this helps,

    Paul
    Paul Tucker
    Automation Expertise Europe
    http://www.automationexpertise.com

  3. #3
    Junior Member
    Join Date
    Dec 1999
    Location
    Allendale, NJ, US
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tag & identifier is changed dynamically

    If the HtmlText Index tag is constant (#1 for example) , you could use that instead of the caption string. Then you could give the identifier a more meaningful name.

  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: Tag & identifier is changed dynamically

    Also, you'd probably want to change the identifier to something like CurrentDate, rather than Oct102000.

    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 07:15 PM.

Copyright BetaSoft Inc.