Error identifying an element in an html page when the "@innerText" property contains a RegEx.

Ask general questions here.
User avatar
Julien Diot
Posts: 59
Joined: Wed Feb 20, 2019 4:25 pm
Location: Amiens (FR)

Error identifying an element in an html page when the "@innerText" property contains a RegEx.

Post by Julien Diot » Thu Feb 21, 2019 7:44 am

Hello,

I just migrated from a Ranorex V5 to V9 version, and I have a problem.

When I write the following information, I get an error (see attachment).
--> "/dom[@pageurl~'.htm']/body/div[3]/table//td[@innertext~'(?i:Glucose 5% perfusion IV)']"

When I write the following information, the identification works correctly.
--> "/dom[@pageurl~'.htm']/body/div[3]/table//td[@innertext~'Glucose 5% perfusion IV']"

Does anyone have an idea of the problem?
You do not have the required permissions to view the files attached to this post.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Error identifying an element in an html page when the "@innerText" property contains a RegEx.

Post by odklizec » Thu Feb 21, 2019 8:44 am

Hi,

In what Ranorex action did you apply this xpath and when exactly did you get the error (while running the test or after adding the action in Studio)?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Julien Diot
Posts: 59
Joined: Wed Feb 20, 2019 4:25 pm
Location: Amiens (FR)

Re: Error identifying an element in an html page when the "@innerText" property contains a RegEx.

Post by Julien Diot » Thu Feb 21, 2019 8:57 am

I get the error from "Ranorex Spy" when I click on "Highlight"

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Error identifying an element in an html page when the "@innerText" property contains a RegEx.

Post by odklizec » Thu Feb 21, 2019 9:15 am

I don't see anything wrong with the regex and honestly the error message looks like something web-browser issued? At least I'm not recognizing such error as Ranorex error (French does not help either ;))?

What web browser (and version) do you use? I just tried to highlight such xpath in Chrome (using 9.0 spy) and it works as expected. So I think the problem must be something browser/system specific?

BTW, just for test, try to enter the text Glucose 5% perfusion IV in below table and try to highlight it with Spy...
https://www.w3schools.com/html/tryit.as ... able_intro
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Julien Diot
Posts: 59
Joined: Wed Feb 20, 2019 4:25 pm
Location: Amiens (FR)

Re: Error identifying an element in an html page when the "@innerText" property contains a RegEx.

Post by Julien Diot » Thu Feb 21, 2019 10:49 am

The test is done from the URL you provided me, it works fine :D .

I just asked the development team, it's a FOXPro application that uses an activeX IE to display these HTML pages.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Error identifying an element in an html page when the "@innerText" property contains a RegEx.

Post by odklizec » Thu Feb 21, 2019 10:57 am

I see, so it's embedded IE. I'm afraid, it's hard to tell what's wrong, without seeing the AUT (snapshot would most probably not help here). I would suggest to contact Ranorex support and request a remote session with them, so they may analyze the problem in a realtime.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Julien Diot
Posts: 59
Joined: Wed Feb 20, 2019 4:25 pm
Location: Amiens (FR)

Re: Error identifying an element in an html page when the "@innerText" property contains a RegEx.

Post by Julien Diot » Thu Feb 21, 2019 11:01 am

All right, I'll do that.

Thank you for your help.

User avatar
Julien Diot
Posts: 59
Joined: Wed Feb 20, 2019 4:25 pm
Location: Amiens (FR)

Re: Error identifying an element in an html page when the "@innerText" property contains a RegEx.

Post by Julien Diot » Tue Feb 26, 2019 4:56 pm

Seen with the support, it is necessary to disable the parameter "Enable JS acceleration for IE9+ without addon" in the Settings dialog box. When this setting is set to false, the error message no longer appears.
You do not have the required permissions to view the files attached to this post.