Image not found

Ask general questions here.
wyll
Posts: 34
Joined: Wed Aug 01, 2012 3:19 pm

Image not found

Post by wyll » Mon Nov 05, 2012 10:28 am

Hello,

Is there a option to continue your code, when you dont find the Bitmap you load in?
When my current testcase doesn't find the image it stops and continue with the next testcase...

I know i can work with
If(Imaging.contains(yourElement,yourBitmap))
  {
    Mouse.Click(yourElement,yourBitmap)
  }
but i don't want to write it the whole time

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

Re: Image not found

Post by Support Team » Tue Nov 06, 2012 9:56 am

Hello,

If you use the Ranorex Recorder, you are able to set the Property 'Continue On Fail' as shown in you user guide in the section Additional Editing Options. If you want to trigger the mouse click within the code, you have to check if the element is available in the code before you click it.

Regards,
Bernhard
.
Image

wyll
Posts: 34
Joined: Wed Aug 01, 2012 3:19 pm

Re: Image not found

Post by wyll » Tue Nov 06, 2012 11:41 am

Hello,

yes i know about the 'Continue on Fail' option... it just makes a try{}catch{} block out of it,doesn't it?

anyway i was just thinking, instead of checking beforehand that the image exist in my element, there might be an option for that only

regards
wyll

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

Re: Image not found

Post by Support Team » Tue Nov 06, 2012 6:18 pm

Hello,

Yes that's correct, the 'Continue on Fail' setting creates a try catch blog around the action within the code. Unfortunately there is no other option to enable this setting for the actions written in the user code.

Regards,
Bernhard
.
Image