Ask a Question

Add cmpContains to the If...Then operation

0 Kudos

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
Marsha_R
Champion Level 2

Have you tried using aqString methods?

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
Champion Level 2

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

Announcements
Welcome to the TestComplete Feature Requests board!

Here you can review submitted feature requests and vote up the ones you like! If you can't find the feature you want - go ahead and suggest your own idea. Ideas with the highest rating can be implemented in the product.

Check out the Create a Feature Request guide for more information.
New Here?
Welcome to the Community
Sign Up Here