Hi,
I have the following issue:
On a webpage a div with some text is displayed as well as a button to close this div. After closing this div it is removed from the dom (it's an angularjs 1 web app).
I check for the none-existence for this div.
In 1 of 4 testruns Ranorex still finds this div though it is removed from the dom.
To solve or at least to examine this issue I tried the following:
- if the element was found I set a breakpoint, look at the web app and its dom: the element isn't visible as well as removed from the dom
- if the element was found I set a delay of 1 minute and try to find again the element (hoping that it is _not_ found) - but it is still found
Any hints?
Thanks, Boris
Ranorex finds element though it's not existing
Re: Ranorex finds element though it's not existing
Hi,
I'm afraid, that without seeing this issue in action, there is not much anyone here can do or suggest. I would suggest to add "create snapshot" action right after the existence check, or even better in "try...catch" block. If existence check fails, the test will create the snapshot. Eventually, create the snapshot manually during breakpoint. Snapshot should tell us if xpath for the element you are looking for does exist or not.
Another thing you can try is to disable "Use cache" for parent element of the problematic element. This could eventually help with "phantom" finds of element, which are no longer available?
I'm afraid, that without seeing this issue in action, there is not much anyone here can do or suggest. I would suggest to add "create snapshot" action right after the existence check, or even better in "try...catch" block. If existence check fails, the test will create the snapshot. Eventually, create the snapshot manually during breakpoint. Snapshot should tell us if xpath for the element you are looking for does exist or not.
Another thing you can try is to disable "Use cache" for parent element of the problematic element. This could eventually help with "phantom" finds of element, which are no longer available?
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
Re: Ranorex finds element though it's not existing
Thanks for the hint regarding the snapshot. It helped me to identify the problem
Re: Ranorex finds element though it's not existing
Hi,
You are welcome. I'm glad it helped
You are welcome. I'm glad it helped
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