Ranorex 9.0 RxPath fails to handle attribute with no value

Bug reports.
CWhiting
Posts: 26
Joined: Thu Mar 08, 2018 9:32 pm

Ranorex 9.0 RxPath fails to handle attribute with no value

Post by CWhiting » Fri Feb 22, 2019 6:51 pm

I have an RxPath for an element where the attribute has no value. With Ranorex 8, I used the string below where title='' and it worked fine. With Ranorex 9.0 that failed to find the element. With Plugins Enable JS-based RanorexXPath evaluation set to FALSE, the path shown below works again.

.//table[#'realtimeTable']/thead/tr[@class='tp-table-sub-header ']/td[@title='']

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Ranorex 9.0 RxPath fails to handle attribute with no value

Post by Support Team » Tue Feb 26, 2019 4:44 pm

Hi CWhiting,

It is difficult to know why this may have started occurring and may have been unintended behavior in older versions of Ranorex. If an element does not have an attribute value, we expect for it to return null() instead of an empty string '' (unless the value truly does equal ''). Please try [@attributename=null()] and see if this resolve your issue.

I hope this helps!

Regards,
Ned

CWhiting
Posts: 26
Joined: Thu Mar 08, 2018 9:32 pm

Re: Ranorex 9.0 RxPath fails to handle attribute with no value

Post by CWhiting » Mon Mar 04, 2019 10:46 pm

[@attributename=null()] works with Plugins Enable JS-based RanorexXPath evaluation set to TRUE.

Because of other xpath issues, I have to have Plugins Enable JS-based RanorexXPath evaluation set to FALSE