Why are my objects not identified when i use a different env

Ask general questions here.
zumar
Posts: 4
Joined: Wed Jun 21, 2017 6:30 pm

Why are my objects not identified when i use a different env

Post by zumar » Sat Jul 01, 2017 12:03 am

I am using an environment to capture my UI elements/objects. When I change the instance (same objects exists on this one too) Ranorex fails to recognize those elements on this environment.

Is there a setting I need to make on my objects that allows them to be recognized in case of a different instance? Please help

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

Re: Why are my objects not identified when i use a different env

Post by odklizec » Mon Jul 03, 2017 7:48 am

Hi,

By different environment you mean different computer? If so, then make sure both original and new computer(s) are configured the same! A most common issue is, that people often setup Ranorex on main PC in certain way, but forgot to configure the target PC the same way ;) This is why you should store Ranorex settings within the solution (this option is available since Ranorex 6.1).

If Ranorex configuration is the same on both PCs, then make sure there are installed the same versions of all required libraries and runtimes! You forgot to mention Ranorex version, kind of application under test (desktop, web, mobile,...) and used technology (WPF, Java, MFC, Delphi,...). Just make sure there are installed the same versions of Ranorex and all necessary libs on all PCs.
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

zumar
Posts: 4
Joined: Wed Jun 21, 2017 6:30 pm

Re: Why are my objects not identified when i use a different env

Post by zumar » Mon Jul 03, 2017 8:06 pm

Ok so by instance I mean a different server. Same application installed at 2 servers, and all I am doing is in my recording I change the web address for the application to a different server. Now the application on both nodes is the same however when I re-run those tests Ranorex cannot find those objects on server 2.

Ranorex version: 7.0.1

I have attached 2 snapshots:
1) The repository which I initially created. The objects under the login folder cannot be recognized when I change the URL of the web instance.

2) I had to re-capture those objects and you can see they are all the same objects.

Am I organizing my repository in a way that its not global OR is there a setting on the objects which you can make that recognizes the objects across all the folders?
Attachments
Ranorex2.jpg
2
Ranorex2.jpg (32.18 KiB) Viewed 396 times
Ranorex1.jpg
1
Ranorex1.jpg (43.45 KiB) Viewed 396 times

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

Re: Why are my objects not identified when i use a different env

Post by odklizec » Tue Jul 04, 2017 7:30 am

Hi,

OK so if the xpaths below DOM are the same, then you have virtually two options:
1) use 'OR' operator in the DOM xpath (like /dom[@domain="something" or @domain="something_else"])
2) variabilize the 'domain' attribute (like /dom[@domain=$domainName] and fill the variable either from TestSuite/TestCase parameter or data connector.
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

zumar
Posts: 4
Joined: Wed Jun 21, 2017 6:30 pm

Re: Why are my objects not identified when i use a different env

Post by zumar » Wed Jul 05, 2017 5:23 am

Thank you so much. I tried with Option 1 and it worked. I will soon implement a data driven test using your suggested option 2.