Hello everyone.
I test my web application with Ranorex Studio, When i'm tracking the element, but it found more than 1, so Ranorex can't know exactly what elements i want to click, and it click incorrect elements (same type elements i'm tracking). How I can identification unique element i want in the web page have a lot the same elements like this.
I'm codeless, hope you can help me.
Thank you.
More than 1 element found when tracking
-
- Posts: 4
- Joined: Thu Apr 22, 2021 4:03 am
More than 1 element found when tracking
You do not have the required permissions to view the files attached to this post.
Re: More than 1 element found when tracking
Hi,
Please create and post a Ranorex snapshot (NOT screenshot) of the app under test. Also, post the xpath (in string form) of the element you are talking about.
Generally speaking, you must enhance the xpath with unique identification attributes, maybe even using another element (typically UI label or text field) as an anchor and from there traverse back to the element in question. Unfortunately, I can't provide a reliable example without seeing the snapshot and xpath in question. Thanks.
Please create and post a Ranorex snapshot (NOT screenshot) of the app under test. Also, post the xpath (in string form) of the element you are talking about.
Generally speaking, you must enhance the xpath with unique identification attributes, maybe even using another element (typically UI label or text field) as an anchor and from there traverse back to the element in question. Unfortunately, I can't provide a reliable example without seeing the snapshot and xpath in question. Thanks.
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: 4
- Joined: Thu Apr 22, 2021 4:03 am
Re: More than 1 element found when tracking
This is my snapshot, can you help me clearly about enhance the xpath with unique identification attributes.
Thank you.
Thank you.
You do not have the required permissions to view the files attached to this post.
Re: More than 1 element found when tracking
Hi,
Please post also the xpath (as string), which returns multiple elements. I don't want to retype it from the screenshot you posted
Please post also the xpath (as string), which returns multiple elements. I don't want to retype it from the screenshot you posted
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: 4
- Joined: Thu Apr 22, 2021 4:03 am
Re: More than 1 element found when tracking
This is my xpath, pls help me.
You do not have the required permissions to view the files attached to this post.
Re: More than 1 element found when tracking
Hi,
I'm afraid, this xpath does not return anything in the snapshot you posted. So please, open the snapshot you posted, manually find the element you want to use and which xpath returns multiple elements. You will have to find the element by expanding and scrolling the element try in Spy.
Generally speaking, the xpath you posted is useless, because there are no unique identifiers and too many element indexes, which are not persistent. Which means that you will have to construct the xpath manually, maybe even using labels associated with the element in question.
For example, let's say you want to type something into Currency input: Here is the unique xpath, you may need to use:
I'm afraid, this xpath does not return anything in the snapshot you posted. So please, open the snapshot you posted, manually find the element you want to use and which xpath returns multiple elements. You will have to find the element by expanding and scrolling the element try in Spy.
Generally speaking, the xpath you posted is useless, because there are no unique identifiers and too many element indexes, which are not persistent. Which means that you will have to construct the xpath manually, maybe even using labels associated with the element in question.
For example, let's say you want to type something into Currency input: Here is the unique xpath, you may need to use:
As you can see, the xpath first finds the "Currency" label, then returns to nearest common ancestor (common for both label and input) and then from there it goes right to the input Unfortunately, there is no other way than to create such xpath manually./dom[@domain='cf-laidon-mdg-test-s4-simple-mdg-web.cfapps.eu10.hana.ondemand.com']//div[#'__bar0-containerContent']//div[@class='sapUiFormCLElement']//label[@class~'sapMLabel']//tag[@innertext='Currency']/ancestor::div[@class='sapUiFormCLElement']//input[@class='sapMInputBaseInner']
You do not have the required permissions to view the files attached to this post.
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