Ranorex finding first element after loggedIn sporadically

Ask general questions here.
neeshpal
Posts: 7
Joined: Tue Jun 11, 2019 6:29 pm

Ranorex finding first element after loggedIn sporadically

Post by neeshpal » Mon Jun 24, 2019 3:20 pm

Hello
I am experiencing this with Ranorex

Ranorex is not able to find first element when application is logged. But it is happening sporadically and most of the times.

As soon as application is logged in, and I try to assert logged In behavior by finding first element I get this always.

Code: Select all

  onecoreuap\inetcore\urlmon\zones\zoneidentifier.cxx(359)\urlmon.dll!727907C9: (caller: 72790258) ReturnHr(10) tid(4af0) 80070002 The system cannot find the file specified.
  The object invoked has disconnected from its clients.
After this error , sometimes Ranorex is able to find first element and sometimes not( though element is clearly visible on screen). If it finds first element , everything thereafter is good. If it doesn't, I get element not found . I am using

Code: Select all

Host.Local.TryFindSingle
method.

Note that I get above urlmon.dll error always ,as soon as AUT is logged in.

How can I make Ranorex recognize application every single time. My AUT is a desktop app with UI built in c++ and I am using VS 2019 .

UPDATE:
I am able to get rid of error message above by following https://stackoverflow.com/questions/202 ... from-its-c but the problem of finding first element by ranorex upon loggedIn remains

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

Re: Ranorex finding first element after loggedIn sporadically

Post by odklizec » Tue Jun 25, 2019 7:13 am

Hi,

At first, you forgot to mention Ranorex version. If you are using something older than most recent 9.1, please try update it and check if the problem still exists. At next, it's impossible to tell what's wrong without, at very least, Ranorex snapshot (NOT screenshot) of the problematic element/AUT and the xpath you are searching for. Could you please deliver those? Ideally, add a Create Snapshot action also to your test and create snapshot of entire app always before searching the problematic element. This could help with identification of possible differences in UI, which may eventually causing your problem. Thanks.

BTW, have you tried to add your AUT to the Ranorex white list?
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

neeshpal
Posts: 7
Joined: Tue Jun 11, 2019 6:29 pm

Re: Ranorex finding first element after loggedIn sporadically

Post by neeshpal » Tue Jun 25, 2019 2:28 pm

Hello
Thank you for your response.

In my project, I am referencing Ranorex.core from version 7.0 . I will update as per your suggestion.

Luckily, after I resolved the issue that I mentioned in my post, Ranorex is recognizing first element correctly so far. After reading on the error a bit and observing behavior after resolving the error, I think , the connection from debugger to the app was lost somehow and thats why ranorex was unable to search for element. But I still wonder why was ranorex able to search sporadically even when there was error. The only reason could be that connection was getting established intermittently without any notice or info logging .

How can we add AUT to ranorex whitelist, in case there is need ? And why do we need to do that?

Thank You again..

User avatar
Stub
Posts: 266
Joined: Fri Jul 15, 2016 1:35 pm

Re: Ranorex finding first element after loggedIn sporadically

Post by Stub » Wed Jun 26, 2019 7:40 am

I add our processes to the Ranorex whitelist to narrow the search scope of Ranorex Spy. And it often simplifies my RxPaths because I am no longer identifying windows in the complete desktop window scope. Lovely. Maybe it speeds up finding windows too.

You can find the Whitelist in the Ranorex Studio UI on the menus and toolbar.

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

Re: Ranorex finding first element after loggedIn sporadically

Post by odklizec » Wed Jun 26, 2019 9:37 am

Hi,
neeshpal wrote:
Tue Jun 25, 2019 2:28 pm
In my project, I am referencing Ranorex.core from version 7.0 . I will update as per your suggestion.
Well, 7.0 is really old and no longer supported Ranorex version. Let's hope that upgrading to most recent version will help?
neeshpal wrote:
Tue Jun 25, 2019 2:28 pm
How can we add AUT to ranorex whitelist, in case there is need ? And why do we need to do that?
I'm afraid, I don't know if the Ranorex whitelist is actually available for VS integration? It's probably one of many Ranorex goodies, which are not available outside the Ranorex Studio (like repository, recording modules, test suite and so on). This is why I really think that going from Ranorex Studio to VS integration actually makes the TA engineer's life harder and much less productive ;)
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