Unable to get the focus on active form

Bug reports.
sunitha
Posts: 24
Joined: Thu May 14, 2009 2:06 pm

Unable to get the focus on active form

Post by sunitha » Thu May 28, 2009 2:22 pm

My script for automating the installation of my product.

System.Diagnostics.Process.Start("C:\\install.exe");

I'm using the above code to launch the installation file.

InstallBldRepository repo = InstallBldRepository.Instance;

repo.WebDocumentInternet_Security_Suite.Self.Focus();
For setting the focus on the WebDocument. It is failing.

How to set the focus to the WebDocument?? :)

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

Post by Support Team » Thu May 28, 2009 2:39 pm

hello sunitha,
mabe your form is minimized.
Better use the EnsureVisible() method. ;)

Regards,
Christian
Ranorex Support Team

sunitha
Posts: 24
Joined: Thu May 14, 2009 2:06 pm

Unable to get the focus on active form

Post by sunitha » Fri May 29, 2009 10:40 am

My Install.exe when clicked extracts and then the webdocument gui gets opened.
I'm setting the focus by using:

InstallRepository repo=InstallRepository.Instance;
repo.WebDocumentInstall.Self.Focus();

But still it doesn't recognize the WebDocumentInstall gui????

I even tried with EnsureVisible() method, but it doesn't work.
:)

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

Post by Support Team » Wed Jun 03, 2009 12:58 pm

You can`t recognize the WebDocument.
Do you get an ElementNotFoundException?
Do you have the correct XPath to the Web GUI element?
Whats the exact problem - what do you want to do?

Regards,
Christian
RAnorex Support Team