Please add an option/axis to identify element(s) without children elements
In certain cases, it would be useful to have an option to identify an element, which contains NO children elements.
Please try the below HTML sample here:
Let's say I need to identify a DIV tag, which is a sibling of DIV tag with string Text_1, but only if the DIV tag contains no children elements. I'f I'm not mistaken, there is currently no way do it with the xpath?
Here is the best xpath I was able to create:
/dom[@caption='Tryit Editor v3.5']/?/?/div[@id='container']/div[@id='iframecontainer']/?/?/div[@id='iframewrapper']/iframe[@id='iframeResult']//p[@innertext='Text_1']/ancestor::div/following-sibling::div[@visible='True']
It returns two DIVs, but I need to identify the one WITHOUT P element. It's easy to identify the one WITH P tag, but there is no way to identify the one without (using xpath) ;)
There hasn’t be any further interest in this feature, so we won’t implement this.
The Ranorex Product Management Team