I have some images in the repository.
How can i access from my programs those images?
When I use the Recorder there are additional images in the Recording1.cs.
Any Hint?
Access Image in Repository
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Access Image in Repository
Hi,
You want to use the images in your code or in a specific recording?
Regards,
Peter
Ranorex Support Team
You want to use the images in your code or in a specific recording?
Regards,
Peter
Ranorex Support Team
Re: Access Image in Repository
I want to use it in my code.
I have small wrappers written
Something like
I could have those options in Code, but I would like to get that image direct from the repository.
I found that image in the xml file, but the generated code doesn't have this part of data.
I have small wrappers written
Something like
public static void Pro_Click() { Report.Info("Mouse Left Click item 'Pro' at Center."); repo.LeftNavi.LeftNavi_Pro.Click(Location.Center); }or
public static void Pro_Zugeklappt_Validate() { Report.Debug("Validating CompareImage (Screenshot: 'Pro_zugeklappt' with region{X=0,Y=1,Width=39,Height=13}) on item 'LeftNavi_Pro'."); Validate.CompareImage(repo.LeftNavi_ProInfo, LeftNavi_Pro_zugeklappt, LeftNavi_Pro_zugeklappt_Options); } }And both LeftNavi_Pro_zugeklappt and LeftNavi_Pro_zugeklappt_Options are generated within Recording1.cs
I could have those options in Code, but I would like to get that image direct from the repository.
I found that image in the xml file, but the generated code doesn't have this part of data.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Access Image in Repository
Hi,
Sorry but there is no way to get the screen shot from the repository. The only way to use a screen shot of your item is to generate it during runtime by code.
Peter
Ranorex Support Team
Sorry but there is no way to get the screen shot from the repository. The only way to use a screen shot of your item is to generate it during runtime by code.
Bitmap myBmp = Imaging.CaptureCompressedImage(repo.yourElement);Regards,
Peter
Ranorex Support Team