Window C# Order Ranorex

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
QATest879
Posts: 31
Joined: Fri Jul 02, 2021 2:35 pm

Window C# Order Ranorex

Post by QATest879 » Thu Oct 28, 2021 6:21 pm

This might be more of a C# question but I'm not sure.

I have two windows that I'm switching between testing, assume both are open at the time.

And one of them is in front of the other one, and I just finished testing with it, and I want to bring the other window in front now, and switch them. And so I'm trying to "focus" or ensure that the other window is now on the front. Is there any good code anybody knows to do this?

Maybe there's a way to do this in the Ranorex namespace or just general C# is fine too, any help would be appreciated. I just need to use code to move one window in front of another one. Thank you.

QATest879
Posts: 31
Joined: Fri Jul 02, 2021 2:35 pm

Re: Window C# Order Ranorex

Post by QATest879 » Thu Oct 28, 2021 6:38 pm

Actually I found out a pretty easy way to do it.

repo.Name.Click();

It works for my purposes. Any other methods of doing this are appreciated now but just letting you all know I resolved the issue using this.

Fergal
Certified Professional
Certified Professional
Posts: 454
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: Window C# Order Ranorex

Post by Fergal » Fri Oct 29, 2021 9:38 am

You could try adding an invoke action - ensure visible. This can be added as an action step in a recorded module.