control identified by spy, not identified while running test

Ask general questions here.
murthyksvr
Posts: 27
Joined: Wed Jul 06, 2016 1:15 pm

control identified by spy, not identified while running test

Post by murthyksvr » Thu Jul 21, 2016 2:07 pm

our application has a control which is identified using ranorex spy. But the control is not found while running the test. I have changed to any processor/any CPU in project properties. But still the control is not getting identified while running test. Please suggest me how to fix this issue?

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

Re: control identified by spy, not identified while running test

Post by odklizec » Thu Jul 21, 2016 2:18 pm

Hi,

I'm afraid, there is not enough details in your post to provide a reasonable answer.

Please post a Ranorex snapshot (NOT screenshot!) of the problematic element.
Please post the xpath of given element (the one you have stored in repository).
Please post the "EXACT" error message you are getting (ideally entire report).

Additionally, once the test fails, re-examine the problematic element with spy and make sure the xpath returned by spy MATCH the one stored in repository! The most common reason causing problems like this are dynamic IDs, eventually, element indexes. Element indexes should be used only as a last resort and only if there is really no other way to identify an element with another attribute/relationship operators.
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

murthyksvr
Posts: 27
Joined: Wed Jul 06, 2016 1:15 pm

Re: control identified by spy, not identified while running test

Post by murthyksvr » Fri Jul 22, 2016 4:58 am

I have matched renorexpath both in run time as well as in repository. during run time, parent element is not getting identified. it is showing repository tree from next element onwards.. I cant share snapshot due to compliance. But i can share you the stacktrace.
at Ranorex.Core.Repository.RepoItemInfo.Find[T](Boolean findSingle, Boolean throwException, Duration effectiveTimeoutOverride) at Ranorex.Core.Repository.RepoItemInfo.CreateAdapter[T](Boolean throwException, Duration waitTimeout) at Ranorex.Core.Repository.RepoItemInfo.CreateAdapter[T](Boolean throwException) at PV.PVRepositoryFolders.SyngoAppFolder.get_Skip() in c:\Users\administrator\Documents\Ranorex\RanorexStudio Projects\PV\PV\PVRepository.cs:line 1692 at PV.AfterLoading.Ranorex.Core.Testing.ITestModule.Run() in c:\Users\administrator\Documents\Ranorex\RanorexStudio Projects\PV\PV\AfterLoading.cs:line 87 at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext)

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: control identified by spy, not identified while running test

Post by Support Team » Tue Jul 26, 2016 9:04 am

Hi murthyksvr,

Without having more detailed information it will be difficult to figure out the cause of the issue.

Would it be possible to send the Ranorex Snapshot and the compressed Ranorex Report of the failed test execution to [email protected]? We could also sign an NDA (Non-disclosure agreement) if it will be required from your side.

I look forward to hearing from you.

Sincerely,
Johannes