Image validation fails after being converted to user code : Automation Tools

Image validation fails after being converted to user code

Ranorex Spy, Recorder, and Studio.

Image validation fails after being converted to user code

Postby Luis Leon » Thu Aug 26, 2010 7:38 pm

Hi,

I used the Image validation item on the action recorder in order to check for a given icon, this action has to be executed in a given situation so I decided to convert it to user code in order to add the required logic.

However, the user code generated does not run since the taken screenshot of the control is not accesible from this context. this is the generated code:

public static void Validate_TextWarning_ico1()
{
//Your code here. Code inside this method will not be changed by the code generator.
Report.Info("Validating ContainsImage (Screenshot: 'Screenshot1' with region {X=0,Y=0,Width=64,Height=64}) on item 'FormWarning_for_recommended_.TextWarning_ico'.");
Validate.ContainsImage(repo.FormWarning_for_recommended_.TextWarning_icoInfo, TextWarning_ico_Screenshot1, TextWarning_ico_Screenshot1_Options, Validate.DefaultMessage, false);

}

The parametes in bold are not found in the user code file context and I can't find them anywhere.

Is there a workaround for this situation?

Regards,
Luis Leon
 
Posts: 10
Joined: Tue Aug 10, 2010 1:18 am

Re: Image validation fails after being converted to user code

Postby Support Team » Fri Aug 27, 2010 10:56 am

This sounds like a bug that has already been fixed with Ranorex release 2.2.2. See its release notes:
http://www.ranorex.com/download/release ... html#c2721

What version of Ranorex do you use? Please update to the latest Ranorex version:
http://www.ranorex.com/download.html

After you update to version 2.2.2 or newer, you might need to re-create the original record item and then convert it to user code again.

Regards,
Alex
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation Tools

Who is online

Users browsing this forum: No registered users and 0 guests