Ranorex recognizes java elements as win32

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
besagon
Posts: 8
Joined: Wed Apr 20, 2016 4:12 pm

Ranorex recognizes java elements as win32

Post by besagon » Mon Apr 25, 2016 2:08 pm

Hi

1. Use java swt legacy automation mode = false
2. I am logged in as domain user and I aim in Administrators group
3. My automation runs Eclipse via run dialog
Win+R->C:\eclipse.exe
4. In this case all java elements recognized as win32 (FlavorName = win32)
5. I tried to run all processes as administrator and this does not help (eclipse.exe, my automation process which runs eclipse)
6. When I run eclipse by double clicking in it icon, java elements recognized correctly (Flavor name = java)

Why this happens? All work of my automation team stopped.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex recognizes java elements as win32

Post by krstcs » Mon Apr 25, 2016 2:56 pm

Have you tried starting Eclipse directly from Ranorex's "Run Application" action instead of using the Run dialog?

The problem is most likely that the Run dialog is somehow obscuring Ranorex's view of the Java process. If you start Eclipse directly from Ranorex it should be better. In addition, try using the Java command-line for Eclipse in Ranorex instead of the Eclipse.exe wrapper. It should look like "java -jar eclipse.jar" or something similar.

In addition, using Run may not start all applications in Admin mode, so Eclipse may not be in the same mode as Ranorex and this can cause issues.
Shortcuts usually aren't...

besagon
Posts: 8
Joined: Wed Apr 20, 2016 4:12 pm

Re: Ranorex recognizes java elements as win32

Post by besagon » Tue Apr 26, 2016 12:28 pm

I found what the problem... Looks like java plugin not "loaded" immediately.

For example:
I do Process.Start("eclipse.exe") and then if I accessed form or any elements on it immediately after form loaded then form recognized as win32. If I insert 10 seconds sleep after form loaded and then try to access form - everything works fine, form recognized as java form. So I suppose java plugin needs some time to do some "internal work". But I think this is bug, because you always tried to access form immediately after form loaded.

Is there any work around to wait until java plugin start working?

besagon
Posts: 8
Joined: Wed Apr 20, 2016 4:12 pm

Re: Ranorex recognizes java elements as win32

Post by besagon » Tue Apr 26, 2016 2:04 pm

And finally problem solved!

Incorrect recognition happens when eclipse started and splash screen appears and in the same time ranorex tries to find something on the main Eclipse form. That is why sleep helps. To solve problem I just start Eclipse with -nosplash parameter and everything work fine now.

besagon
Posts: 8
Joined: Wed Apr 20, 2016 4:12 pm

Re: Ranorex recognizes java elements as win32

Post by besagon » Wed Jul 06, 2016 6:15 pm

Will this bug be fixed?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Ranorex recognizes java elements as win32

Post by Support Team » Mon Jul 11, 2016 2:00 pm

Hi Besagon,

Unfortunately, I'm not able to reproduce your issue.
In order to analyze this in more detail, it would be great if you could send an email to [email protected] with a detailed description of your intention.

I'm looking forward to your email.

Sincerely,
Matthias
.
Image