[@innertext!=''] behaves differently in IE11 and Chrome

Bug reports.
bellew.mike
Posts: 10
Joined: Wed Jan 14, 2015 1:20 pm

[@innertext!=''] behaves differently in IE11 and Chrome

Post by bellew.mike » Thu Oct 27, 2016 12:00 pm

Ranorex Version: 5.4.5.19886
Site: http://www.ranorex.com

Steps:
Open ranorex spy
Open ranorex.com in both IE11 and Chrome
Enter search path of /dom[@domain='www.ranorex.com']//*[@id~'language-nav']//*[@innertext!='']
Press enter

Result:
In Chrome: Only the 4 elements I was expecting to see are identified
In IE11: The 4 elements I was expecting are identified, as are all the parent elements up to and including *[@id~'language-nav']

Screenshot attached
Attachments
Innertext.png
Innertext.png (83.47 KiB) Viewed 518 times

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

Re: [@innertext!=''] behaves differently in IE11 and Chrome

Post by odklizec » Thu Oct 27, 2016 12:04 pm

Hi,

At first, Ranorex 5.4.5 is too old and no longer supported. Please try the same with latest 6.1.1. At second, please post a Ranorex snapshot (not screenshot) of both DOMs. Thanks.
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

bellew.mike
Posts: 10
Joined: Wed Jan 14, 2015 1:20 pm

Re: [@innertext!=''] behaves differently in IE11 and Chrome

Post by bellew.mike » Thu Oct 27, 2016 12:17 pm

odklizec wrote:At first, Ranorex 5.4.5 is too old and no longer supported. Please try the same with latest 6.1.1. At second, please post a Ranorex snapshot (not screenshot) of both DOMs. Thanks.
I have now attached the snapshots from this version.

I dont have the time to time to install the latest, try on that, then uninstall and reinstall 5.4.5. I just suspected the bug is still there in 6.1 and only takes 2 seconds to follow my steps to reproduce as I used the ranorex homepage in my example.
Attachments
IE11.rxsnp
(862.42 KiB) Downloaded 35 times
Chrome.rxsnp
(197.78 KiB) Downloaded 26 times

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

Re: [@innertext!=''] behaves differently in IE11 and Chrome

Post by odklizec » Thu Oct 27, 2016 12:55 pm

Hi,

OK, as I've suspected, there is no problem with Ranorex. It's just that the InnerText (in the elements found in IE) is not empty! There are some spaces! I guess it's something IE-related? Anyway, this xpath should do what you want:
/dom[@domain='www.ranorex.com']//*[@id~'language-nav']//*[@innertext~'^(?!\s*$).+']
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