Forum Discussion

william_roe's avatar
william_roe
Super Contributor
11 years ago

Keyword 'Contains' Condition on Keyword Project Variable

I'm try to write an 'If' construct in a keyword test on a project variable to see if it contains a character but the only condition available are equal, not equal, greater than, less than. How do I test if it contains a particular character?



I've written the following script but can't figure out how to call it from within the logic parameter in the if statment.

1 Reply

  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3
    See attached.  Here's what it says inside the If boxes:



    aqString.Find(KeywordTests.COA_Verify.Variables.COAText,"Item ",0,True)

    does not equal

    -1





    My variable (local in this case) is COAText and my search string is "Item ".