SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jun 2001
    Location
    Amesbury
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What is the correct Wildcard \"*\" usage ?

    Here is what the book says:
    <begin>
    Wildcards

    You can specify wildcards wherever you provide strings that SilkTest will search for:

    The * character matches zero or more characters

    The ? character matches exactly one character

    For example, "David H?ll" matches "David Hill" and "David Hall", but not "David Hiller". "David H*" matches " David Hill", " David Hall", " David Hiller", and " David Hayes".

    Examples of where you can use wildcards

    Here are some of the situations where you can specify wildcards:

    Tags

    Search text in the MatchStr function

    Search text in the FindCell method

    Identifier for items in combo boxes, list boxes, radio lists, and so on
    <end>

    Okay I can't seem to get it to work. I get and item from a listbox and place in a string variable. I edit the value in the WinPropTree for my Verify Property command in my code. I change it from "Foobar(date) "
    to "Foobar*"

    The string var above contains "Foobar(date) ". It doesn't work.

    I also tried the "Stuff()" function to insert a wild card into the string var containing the actual data :"Foobar*(date) "
    That doesn't work either.

    I even tried replacing the "VerifyProperty()"
    with VerifyValue("Foobar*"). That doesn't work either.

    Very frustrating...

    ------------------
    Steven E. Price
    Senior Quality Assurance Engineer
    Virtual Access Networks
    (978) 722 - 7122
    Steven E. Price
    Senior Quality Assurance Engineer
    Virtual Access Networks
    (978) 722 - 7122

  2. #2
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What is the correct Wildcard \"*\" usage ?

    I believe Verify does not accept wildcards. I tried the code below...

    the first verify fails. comment it out and the second verify succeeds. I guess you can use the second verify staement as a way to make it do what you want.

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

  3. #3
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What is the correct Wildcard \"*\" usage ?

    Can you use MatchStr() which accepts wildcard.

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

  4. #4
    Junior Member
    Join Date
    Jun 2001
    Location
    Amesbury
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What is the correct Wildcard \"*\" usage ?

    It wouldn't help. Eventually I have to do a string compare.

    The app that I test creates a user named entity for holding data. The app appends a datestamp to the name. My test creates one of these "data containers". Upon completion, I have the application log back in and look in a list box for that object. If it finds it then it should pass.

    Since the date will be different each time, I want to strip off the date from the named container. So I open the prop tree from VerifyProperty and strip it off and leave a wild card appended "qavan*" (I tried it using a verify statement with the string "qavan*" for the expect data but it gets treated as a literal. The incomming Actual data (I used the "Left function) looked good "qavan". according to the notes above, this should be a valid comparison.

    I would think that this type of data manipulation would be quit common.

    WinRunner/Testpartner handle this better from what I'm told.

    ------------------
    Steven E. Price
    Senior Quality Assurance Engineer
    Virtual Access Networks
    (978) 722 - 7122


    [This message has been edited by Steven Price (edited 10-19-2001).]
    Steven E. Price
    Senior Quality Assurance Engineer
    Virtual Access Networks
    (978) 722 - 7122

  5. #5
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What is the correct Wildcard \"*\" usage ?

    I'm having a hard time following you. Can you send some code?

    post it or send to bcarroll@connected.com

    I still believe MatchStr() should allow us to do what we need.

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

  6. #6
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: What is the correct Wildcard \"*\" usage ?

    Why don't you grab the information and compare them using MatchStr. As you know, not all function accepts wildcards. Also you can use StrPos which returns substring position. In the essence VerifyProperties is just a string compare function, so why not just write your own that works.

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

 

 

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 05:50 AM.

Copyright BetaSoft Inc.