cancel
Showing results for 
Search instead for 
Did you mean: 

Switch TestComplete's focus among processes

SOLVED
Super Contributor

Switch TestComplete's focus among processes

Hi,

 

I have 2 processes that opens 2 forms side by side. Visualy, there isn't a form that overlaps another.

I have to focus on the left form, but it says :

 

Unexpected window: 'theRightForm'

 

So before acting on this form i'm trying to set the focus, but I didn't manage to do so.

 

I tried :

Aliases.MyProcess.MyForm.Activate()

or

Aliases.MyProcess.MyForm.SetFocus()

or

Aliases.MyProcess.MyForm.Click()

 

Anyone could advise please ?

 

Thank you,

 

Mehdi

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Switch TestComplete's focus among processes

You can, in the project, check the option to ignore unexpected windows.  Will this resolve things?  It's possible that the unexpected window handler is preventing the additional clicks.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
3 REPLIES 3
Community Hero

Re: Switch TestComplete's focus among processes

If the RightForm is modal in any way, while it doesn't overlap, it will still be an "unexpected window".


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Super Contributor

Re: Switch TestComplete's focus among processes

Hi Robert,

But when I manualy clic on the left window the test succeed...

I wish I could make the robot do this click.

Community Hero

Re: Switch TestComplete's focus among processes

You can, in the project, check the option to ignore unexpected windows.  Will this resolve things?  It's possible that the unexpected window handler is preventing the additional clicks.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2