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='']
Ranorex 9.0 RxPath fails to handle attribute with no value
- Support Team
- 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
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
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
Re: Ranorex 9.0 RxPath fails to handle attribute with no value
[@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
Because of other xpath issues, I have to have Plugins Enable JS-based RanorexXPath evaluation set to FALSE