Application focus problem

Ask general questions here.
User avatar
giuseppe.lacagnina
Posts: 113
Joined: Fri Sep 18, 2015 10:25 am
Location: Brunn am Gebirge, Vienna, Austria

Application focus problem

Post by giuseppe.lacagnina » Wed Jan 04, 2017 9:27 am

Dear All,

unfortunately I cannot still update and I am using Ranorex 5.4.4. I have an issue with browser focus which has started to happen recently (strangely enough, it never happened before).

I am running my tests remotely on a VM with Windows Server 2008 R2.

I am starting the tests through another application that calls Ranorex and collects the results.

What happens is that sometimes the test starts and opens IE as it should, but the browser window does not have the focus. It stays in the background, and the test fails. When I look at the report, I find black screenshots.

Has anyone had this problem? Any known solution?

Thanks!!!

User avatar
RobinHood42
Posts: 239
Joined: Fri Jan 09, 2015 3:24 pm

Re: Application focus problem

Post by RobinHood42 » Thu Jan 05, 2017 2:43 pm

Hi,

Basically, there are two things that would come to my mind and that could cause such a behavior.
1.) You are using RDP and the connection is closed
2.) The Ranorex executeable is not started with administrator privileges.

By the way, have you already tried adding an "ensure visible" action to your test as a workaround?

Cheers,
Robin

User avatar
giuseppe.lacagnina
Posts: 113
Joined: Fri Sep 18, 2015 10:25 am
Location: Brunn am Gebirge, Vienna, Austria

Re: Application focus problem

Post by giuseppe.lacagnina » Thu Jan 05, 2017 2:47 pm

The connection is not lost because I saw it happen in front of my eyes. I could manually click on the IE icon on the taskbar, thus "helping" Ranorex. Everything was fine, then.

I do not believe I need to explicitely run as administrator for the OS configuration I have. I have seen in other systems what happens when such privileges are lacking. The situation is different, and futhermore my issue happens only now and then.

About "ensure visible", what do you mean? The check for @visible='True' in the repository or something else? That would be new to me!

Thanks for the support :D

User avatar
giuseppe.lacagnina
Posts: 113
Joined: Fri Sep 18, 2015 10:25 am
Location: Brunn am Gebirge, Vienna, Austria

Re: Application focus problem

Post by giuseppe.lacagnina » Thu Jan 05, 2017 2:53 pm

I see! I will try to use the EnsureVisible method in the beginning!
THANKS!