Page 1 of 1

Ranorex.Form::Close API is not working consistently

Posted: Wed Aug 12, 2009 2:11 pm
by cancerion
Hi,

I am using Ranorex 2.1.2 version.

I tried to use Ranorex.Form::Close API many times but it is not giving consistent results. It doesn’t return any value, so we can not check it's success and log information into Ranorex log.

Is there any way to ensure Ranorex.Form::Close success?

There are many methods like click() etc… ,in all these case how can we ensure that operation has been performed as they are not returning any value?

Thanks,
Sachin

Re: Ranorex.Form::Close API is not working consistently

Posted: Wed Aug 12, 2009 2:58 pm
by Support Team
Hi Sachin!

In some cases e.g. 'windows control panel' the Form.Close method doesn`t work. In the 'control panel' case because the 'exlorer.exe' process handles the windows messaging. However, simply check the 'Form.Valid' attribute or try to find the form element again. If 'Form.Valid' returns false or the form wasn`t found the 'Form.Close' didn`t work.

There`s no common way to check if a method has succeeded or not from a user's point of view. When you click on a button and nothing happens you don`t know if the click wasn`t successful or the button does nothing. After performing an action on an element check if the situation has changed correctly.

Regards,
Christian
Support Team