Identifying 2 or more paths

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
csolanki
Posts: 73
Joined: Thu Mar 22, 2018 8:51 am

Identifying 2 or more paths

Post by csolanki » Wed May 02, 2018 8:24 am

I am facing an issue in Ranorex with my web app testing which is, when I am tracking login button of my website it is giving me 2 Ranorex paths. While using either of them, test case will fail for another path alternatively mostly.I have tried giving href with Ranorex path.

Will you be able to tell any solution if Ranorex gives 2 ,or more than this, paths for an element. Windows - 10, Chrome plug-in prominently, Let me know if you need more details.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3933
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Identifying 2 or more paths

Post by odklizec » Wed May 02, 2018 8:41 am

Hi,

Please post a Ranorex snapshot (not screenshot) and xpath you are using for identifying the element in question. Without at very least snapshot, there is not much anyone here can do or suggest. Basically, you must improve the xpath to return just one element.
Pavel Kudrys
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

csolanki
Posts: 73
Joined: Thu Mar 22, 2018 8:51 am

Re: Identifying 2 or more paths

Post by csolanki » Wed May 02, 2018 8:55 am

Okay, PFA.
Attachments
RanorexLogin3.rxsnp
Login 2
(175.67 KiB) Downloaded 9 times
RanorexLogin2.rxsnp
Login 1
(176.91 KiB) Downloaded 9 times

csolanki
Posts: 73
Joined: Thu Mar 22, 2018 8:51 am

Re: Identifying 2 or more paths

Post by csolanki » Wed May 02, 2018 9:02 am

x- paths :
Login 2 : /dom[@domain='citizennet.com']//a[#'login']
Login 3 : /dom[@domain='citizennet.com']/body/div[6]/div/div/div/div[2]/form[@name='loginForm']/?/?/button[@innertext='Login']

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3933
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Identifying 2 or more paths

Post by odklizec » Wed May 02, 2018 9:46 am

Hi,

I'm afraid, neither xpath works for any of the provided snapshot. This xpath works in both of them...
/dom[@domain='citizennet.com']/body//form[@name='loginForm']/?/?/button[@innertext='Login']
Pavel Kudrys
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

csolanki
Posts: 73
Joined: Thu Mar 22, 2018 8:51 am

Re: Identifying 2 or more paths

Post by csolanki » Wed May 02, 2018 10:03 am

I tried your path, it is not working for me.

What else could be the solution for it ?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3933
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Identifying 2 or more paths

Post by odklizec » Wed May 02, 2018 10:56 am

Have you tried to open the xpath in Spy? Try to find this xpath:
/dom[@domain='citizennet.com']/body//form[@name='loginForm']
If this xpath is not found, then there is either no form with name loginForm or the domain name is different? If the loginForm is found, then there is most probably a problem with Login button?
Pavel Kudrys
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

csolanki
Posts: 73
Joined: Thu Mar 22, 2018 8:51 am

Re: Identifying 2 or more paths

Post by csolanki » Wed May 02, 2018 12:53 pm

Hey, I am able to find mentioned x path. I will check with dev. now. Thanks a lot for quick response.