Hi there!
I'm hoping someone will have encountered a similar issue, as I've really been having trouble with getting a certain element on a page to be recognized using WebElements in UFT One (CE 24.2). For a bit of context, I am attempting to verify certain parameters for documents uploaded to OpenText Content Server.
The two elements in question are:
1. <a href="/otcs/(...)" target="info">r-[XXXX]-YYYYYYY-(Workspace-Coordinators)</a>
2. <a href="/otcs/(...)" target="info">r-[XXXX]-ZZZZZZZ-AA-DIR-(Director's-Office)</a>
To recognize the elements, I have attempted to use the following:
If Browser("Main").WebElement("html tag:=A", "innertext:=r\-\[XXXX\]\-YYYYYYY\-AA\-DIR\-\(Director\'s\-Office\)").Exist Then
If Browser("Main").WebElement("html tag:=A", "innertext:=r-[XXXX]-YYYYYYY-AA-DIR-(Director's-Office)").Exist Then
I noticed that UFT was able to recognize the link on the page with r-[XXXX]-ZZZZZZZ-AA-DIR-(Director's-Office) when escaped, but not r-[XXXX]-YYYYYYY-(Workspace-Coordinators) while in its original form and escaped. The regular expression evaluator confirms that the escaped version of the inner text should match in theory, for both elements.
Are there any limitations that I should be aware of that I'm missing? The other question is whether there is a way to disable regular expression parsing in the WebElement innertext search (i.e., taking a string as literal), which would help me reduce the number of things going on (I am currently using some code to escape the text).
As an aside, I am not sure that I can use object spy/identification as the text for these elements come in from an external spreadsheet, but if this is possible, I'm all ears.
Thanks,
Andrew