Page 1 of 1

Unable to get the focus on active form

Posted: Thu May 28, 2009 2:22 pm
by sunitha
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?? :)

Posted: Thu May 28, 2009 2:39 pm
by Support Team
hello sunitha,
mabe your form is minimized.
Better use the EnsureVisible() method. ;)

Regards,
Christian
Ranorex Support Team

Unable to get the focus on active form

Posted: Fri May 29, 2009 10:40 am
by sunitha
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.
:)

Posted: Wed Jun 03, 2009 12:58 pm
by Support Team
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