Eggplant Drive check for image

I am trying to use eggplant drive to check for a image and return whether or not it finds it

Currently I have this (python 2.7.3)

if (proxy.Execute(‘ImageFound(10, “Panel_Title_Introduction”)’)):

I get the following error:

A fault occurred
Fault code: 4
Fault string: STUnknownMessage: ERROR: ‘imagefound’ was called as a Command, but is only available as a Function

Which if I’m interpreting it right means I can’t use ImageFound

So either how would I correctly use ImageFound or what should I do instead

Thanks for any help

Try using a Return command like this:

if (proxy.Execute('Return ImageFound(10, "Panel_Title_Introduction")')): 

ImageFound() is a function. A function returns a value which must be handled in some way, so a function must be called as part of a larger statement. It is adequate to simply make a function the target of the put command, so you could change your call to:

proxy.Execute('put ImageFound(10, "Panel_Title_Introduction")')

Then check the ReturnValue of the XMLRPC response for the result of the function call.

Ok Thank you both :slight_smile: