Ranorex.Form::Close API is not working consistently

Ask general questions here.
cancerion
Posts: 30
Joined: Tue Jun 16, 2009 6:15 pm

Ranorex.Form::Close API is not working consistently

Post by cancerion » Wed Aug 12, 2009 2:11 pm

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

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

Post by Support Team » Wed Aug 12, 2009 2:58 pm

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
.
Image