Hi Guys,
My Problem is that I have two websites, with "the same" buttons on it. The only difference is that for one button, the innertext has a normal space and the other one has a no-break space ( ). Unfortunately, the RxPaths of both elements look exactly the same, but it doesn't identify one with another.
Is there a way to create one RxPath for both elements?
I attached two sample HTML-files which should demonstrate the problem.
Thanks a lot.
TroubleMaker
Problem with "No-Break Space"
-
- Posts: 6
- Joined: Thu Feb 20, 2020 10:42 am
Problem with "No-Break Space"
You do not have the required permissions to view the files attached to this post.
Re: Problem with "No-Break Space"
Hi,
I think the easiest way would be to construct the xpath, with just part of the text? e.g.This should return both instances of element.
I think the easiest way would be to construct the xpath, with just part of the text? e.g.
Code: Select all
//h1[@innertext~'Heading']
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 6
- Joined: Thu Feb 20, 2020 10:42 am
Re: Problem with "No-Break Space"
Hi Odklizec,
Thanks for your response.
That's true, but it seems that Ranorex doesn't show the difference between a no-break space and a "normal" space.
I'm currently using Regex to differ between the two characters.
/dom[@caption='Page Title']/?/?/h1[@innertext~'This is a( | )Heading']
I simply pasted the no-break space to the spy and it works well.
Maybe this will help someone in the future.
Cheers,
Trouble
Thanks for your response.
That's true, but it seems that Ranorex doesn't show the difference between a no-break space and a "normal" space.
I'm currently using Regex to differ between the two characters.
/dom[@caption='Page Title']/?/?/h1[@innertext~'This is a( | )Heading']
I simply pasted the no-break space to the spy and it works well.
Maybe this will help someone in the future.
Cheers,
Trouble