by Ciege » Tue Mar 02, 2010 7:28 pm
If you are really only doing browser testing you can look into using the DOM. With the DOM object of IE you do not (usually) need to do any mouse clicks. Further the browser could even be in a minimized state and testing can continue.
Once you get the DOM object you can set values (like in the Google search box) and fire the click event of the submit button then read the results all without having to move the mouse. Once you understand how to call the DOM events yourself it's actually quite easy. There are limitation though... Some click events trigger other code to happen specifically when the mouse is clicked on that item so you would also need to fire any events that are supposed to occur from a physical click yourself to make sure they happen correctly. Also, any non-DOM windows (like an IE popup window) would need to be handled apart from your DOM code.
But more to the point of your question about making sure a click occurs in the correct window. You can call the window.activate() method from Ranorex to make sure that the specific window you want to work with is active. You can also call the window.minimize() method on the other windows that do not need a click at this time if you want to. Still, with this, you would need to 100% verify in code that two threads are not trying to work on a window at the same time, else you will have a very high chance of failure.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...