Objects only identified if solution is run from Studio

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
jebner
Posts: 3
Joined: Thu Feb 01, 2018 9:54 am

Objects only identified if solution is run from Studio

Post by jebner » Thu Feb 01, 2018 12:05 pm

Since Windows Update to Version 1709 object recognitions only works if I run the solution from Ranorex Studio.
If I manually run the executable (for example with Windows task scheduler) something like

- start explorer.exe with D:\
- wait for item to exist: /form[@title~'D']/?//?//listitem/text[@text='Foldername']

does not find the folder.
It does not seem to be a rights issue because it is still not working if I run it as administrator.

Any ideas?

Regards, Jakob
(using Ranorex 8.0)

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

Re: Objects only identified if solution is run from Studio

Post by odklizec » Thu Feb 01, 2018 1:51 pm

Hi,

Please upload a Ranorex snapshot of the problematic element, both from the app started from Ranorex Studio and from executable. Without, at very least, Ranorex snapshot, there is not much anyone here can do or suggest. Ideally, post also a small sample project.

Because you are a new forum member, you will have to use a 3rd party file sharing service (like dropbox or one drive) and post here a link.
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

jebner
Posts: 3
Joined: Thu Feb 01, 2018 9:54 am

Re: Objects only identified if solution is run from Studio

Post by jebner » Thu Feb 01, 2018 3:17 pm

Thanks for the reply.
A small sample project and the corresponding snapshot can be found here:
https://alicona-my.sharepoint.com/:f:/p ... 43NXjJOJ_Q

(For it to work you'll need a folder called Ranorex on your D drive)

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

Re: Objects only identified if solution is run from Studio

Post by odklizec » Thu Feb 01, 2018 3:54 pm

Hi,

The xpath you are using is extremely unstable and pretty short, which means it may take much longer to find the element than is the EffectiveTimeout value (30s) of given element. You need to make the xpath somewhat more precise, to make it faster to find e.g. like this:
/form[@title~'(D:)' and @processname='explorer']/element[@class='ShellTabWindowClass']//container/listitem[@text='Ranorex']/text[@name='Name']
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

jebner
Posts: 3
Joined: Thu Feb 01, 2018 9:54 am

Re: Objects only identified if solution is run from Studio

Post by jebner » Mon Feb 05, 2018 5:50 pm

Hi,
thank you for the tips about more xpath options, fairly new to Ranorex :).

But in our test solution we have higher timeouts and as I said, it only happens when starting the executable directly. The example was to show that it does not only affect our AUT but windows explorer as well.
Also tried a reinstall of Ranorex, but that did not help.

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

Re: Objects only identified if solution is run from Studio

Post by odklizec » Tue Feb 06, 2018 8:32 am

Hi,

Well, your sample project (after I modified the xpaths) seems works as expected to me? So I can only guess what's wrong in your case? Are you sure you running tests as administrator (when started from command line)? Could you please post an ACTUAL snapshot and EXACT error message from your failing test? Without (at very least) these details, it's impossible to tell what's wrong or suggest something meaningful.
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