SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Sep 2000
    Posts
    159
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Verification and wildcard characters

    Is it possible to use Wild Cards with Verify ?

    I am wondering because I want to verify the contents of a JFCTable. I want to verify a particular cell contains a number. The number
    will change with each script run.
    Likewise , I want to check that a partial string exists in a cell (for example "Date")

    What would be the best way to do this?


    Following code Fails.

    [-] testcase Verify1 () appstate none
    [ ] List of String Expected
    [ ]
    [ ] Expected = {"user*","Date*"}
    [ ] Verify ( {"user John","Date Feb 26" },Expected )

  2. #2
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Verification and wildcard characters

    just wondering if you've tried using the Left () or the SubStr () functions?

    And last but not least (I forgot this earlier), the FuzzyVerify () function?



    [This message has been edited by Gilbert (edited 02-26-2001).]

  3. #3
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verification and wildcard characters

    To my knowledge, Verify does not accept wildcards.

    I think you need to use MatchStr that will use wildcards, to verify the data.

    Sidenote: Could you provide the testcase / function at the time of Verify the exact user and date you are expecting? If you are doing dates based on "today", you can use the SilkTest Date manipulation functions to arrange the date to match the "expected" format. Look at GetDateTime() and FormatDateTime. Doing this would enable you to use Verify, and make it much more stringent than a wildcard match to indicate success.
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  4. #4
    Senior Member
    Join Date
    Sep 2000
    Posts
    159
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verification and wildcard characters

    Thanks All.

    As for String functions, I think they apply to a single string.

    I am comparing a List of Strings (gotten from a JavaJFC Table).

    So I guess I will have to write my own
    Compare function.

    I will also look at GetDate() to verify
    the date cell.

  5. #5
    Member
    Join Date
    Jan 2000
    Location
    Manchester, NH 03102
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verification and wildcard characters

    Raul, I have used MatchStr() and FuzzyVerify(). I did not like the accuracy of FuzzyVerify() but have been using MatchStr() with some faith. The following I use as a great little bread and butter job for many compares. Granted, I'm not using a list of string.

    String sClipboard
    String sValue
    String sText = "Put your compare text in here"
    sClipboard = "{Clipboard.GetText ()}"
    sValue = "{MatchStr ("*{sText}*", "{sClipboard}")}"
    if sValue == "{True}"
    Print ("Both values matched!")
    else
    RaiseError (101, "Compare verify failed...")

    Hope this helps!
    Brian-

 

 

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 11:03 AM.

Copyright BetaSoft Inc.