sothqamb's avatar
sothqamb
Occasional Contributor
2 years ago
Status:
New Idea

Add cmpContains to the If...Then operation

Quite often I need to run an If...Then check on a small portion of the outerHTML property of an object and there is no convenient way to do so. Right now I have to match the entire string of the property, which is cumbersome and prone to requiring regular maintenance, or using a combination of the Compare Properties and an If..Then using the Last Operation Result Mode, which isn't intuitive and looks messy.

3 Comments

  • sothqamb's avatar
    sothqamb
    Occasional Contributor

    I have not, but looking at the documentation it would certainly be a good solution if I was using a Script Test. Unfortunately if you were to try to use it in a Keyword Test it doesn't seem like it would be much different than using the Compare Properties operation, unless I'm missing something obvious.

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    In a keyword test you would use Set Variable Value to get your partial string, then use that variable in your If.