SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Sep 2001
    Location
    California, USA
    Posts
    164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can two strings be added and then compared to a third string?

    I am trying to create a test case where I am validating a clients first and last name. On one page the First and Last name are recorded as separate htmltext fields. The next page where I want to compare this data saves the First and Last name in one text field.

    I basically want to create a string function that gives a result like:

    sClientFullName == sClientFirstName + sClientLastName

    I have been checking the SilkTest help for a function that performs the "+" part of the equation above.

    Does this exist in Silk Test?

  2. #2
    Senior Member
    Join Date
    Sep 1999
    Location
    San Jose,CA,USA
    Posts
    340
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Can two strings be added and then compared to a third string?

    Try this line CrazyQABoy
    if sClientFullName == "{sClientFirstName} {sClientLastName}"
    print("life is good")

    ------------------
    "Smoke me a kipper, I'll be back for breakfast!"
    Sincerely
    Richard Weth
    Sr. QA Engineer
    mailto:rick_weth@yahoo.com

    [This message has been edited by rick_weth (edited 12-10-2002).]

    [This message has been edited by rick_weth (edited 12-10-2002).]
    Smoke me a kipper, I'll be back for breakfast!
    Sincerely
    Richard Weth
    Sr. QA Engineer

  3. #3
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Can two strings be added and then compared to a third string?

    If you want to concatenate two strings, the '+' operator does this. For example, tweaking your code example very slightly:

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

 

 

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:44 AM.

Copyright BetaSoft Inc.