VernReimer
8 years agoNew Contributor
Regexp not found
I am looking for an Add button object, in a Keyword test, who's height can change vary 23 to 24 pixels because of Bootstrap.
I'm have written this as a Code Snippet...
Sys.Browser("*").Page("*").Find(["ObjectIdentifier","ObjectType","Height"],["add","Button","regexp:23|24"],200).Click();
Unfortunately TestComplete doesn't seem to recognize the regular expression and find the object.
Is there more I should be doing so it can recognize the regular expression?
Hello Vern,
Is the height 23 or 24?
a|b Matches either the a or b character or a group. For example, A|abc matches Abc and abc, but not A. The htm|(ml) pattern matches htm and html, but not htl or ml. [ ] Matches any single character specified in brackets. For instance, d[ab]e matches dae or dbe and does not match dwe or dxe. To include the ] character into the search, make it either first, or last character in the range or use \]. For example, []abc], [abc]] or [ab\]cd]. I believe your regex should be "regexp:2[34]" if that is the case
https://support.smartbear.com/testcomplete/docs/reference/misc/regular-expressions.html