White spaces and the Dynamic Recognition Model
Does anyone have a good solution with the open agent for matching the following, innertext = 'MA ' and innertext = 'MA'. I searched for regular expressions in the help but didn't find anything...
Re: White spaces and the Dynamic Recognition Model
innerText sounds like you are testing with the xBrowser TechDomain. You can use the wildcards "*" and "?" in values of locators.
However the example is a little complicated as it can result in very bad performance for the following reasons:
* innerText always returns all text the is contained between start and end tag of the element - which can be quite a lot (e.g. the body element will contain all text of the page)
* if you use wildcards, the pattern matching within large innerTexts will be quite expensive.
The example above will therefore have to look in every DomElements innerText and do some pattern matching.
So it's better if you know the tag name of the element and use it instead of the DomElement class name. And it's a good idea not to start innerText values with a wildcard.