Page 1 of 1

Click button curtained off by other window

Posted: Mon Jun 22, 2009 2:58 am
by marcushe
1. When i run my application ,some casual popup window of other application will curtain off my button ,it will lead my program to fail. Can ranorex click covered buttons??(it is enabled ,just covered)

2. Can i set off mouse trace? during run ,ranorex will imitate entire mouse action ,moving trace and click. moving tracing is not neccessary to me ,can i set off it?

Re: Click button curtained off by other window

Posted: Mon Jun 22, 2009 5:31 pm
by Ciege
By default, Ranorex (and other test automation tools) work the way a user would work. If they can't click the button, the automation script can't click the button.

Suggestions would be to make sure the form that the button lives on is activated and visible on the screen. Your code should resemble the actions a user would take. Try making a PushButtonClick method that you pass the form object and the button control name to. The method can then (each time it is called) check the validity of the button and verify that the form is visible and activated.

Re: Click button curtained off by other window

Posted: Tue Jun 23, 2009 1:44 am
by marcushe
Trying

Re: Click button curtained off by other window

Posted: Tue Jun 23, 2009 12:11 pm
by Support Team
ad 1) As Ciege already said, usually Ranorex can only do what a human user can do.
There are some cases where you can simulate a mouse click on an element without actually moving/clicking the mouse, e.g. the WebElement.PerformClick, Button.Press, or invoking the PerformClick method on a control usgin Control.InvokeMethod. However, all those methods interact with the element in way a human user can't and are therefore not recommended for testing purposes.

ad 2) If you set the mouse move time to zero, the mouse will instantly move to the specified location.

Regards,
Alex
Ranorex Support Team