Hi,
Thanks for your reply. I have tried another approach that works for the mean time. So, I'll try the proposed method later.
I have another issue.
This is what I wanna achieve:
1) Capture the image of the status row.
2) If image is set string status="success";
3) If image is set string status="running";
and so on..
Since I'm new to Ranorex and C#, I'm totally lost especially on the image part. Hope you can help.
This is the repository
Cheers,
Siti
Edit by Ranorex: Moved to new topic
How to set variable based on image
How to set variable based on image
You do not have the required permissions to view the files attached to this post.
- RobinHood42
- Posts: 324
- Joined: Fri Jan 09, 2015 3:24 pm
Re: How to set variable based on image
Hi Siti,
I'm not exactly sure if working with images is the best approach to accomplish this intention, but you could use the Validate.CompareImage- method() to check if the desired image is part of your row.
for example
Cheers,
Robin
I'm not exactly sure if working with images is the best approach to accomplish this intention, but you could use the Validate.CompareImage- method() to check if the desired image is part of your row.
for example
bool isRunning = Validate.CompareImage(repo.RootFolder.StatusRow1Info, StatusRow1_Screenshot1, StatusRow1_Screenshot1_Options, "Message", false); if(isRunning) status ="running";More information about the Validate.CompareImage can be found in the API Documentation.
Cheers,
Robin
Re: How to set variable based on image
hi,
this produced errors;
The name 'StatusRow1_Screenshot2_Options' does not exist in the current context (CS0103)
The name 'StatusRow1_Screenshot2' does not exist in the current context (CS0103)
What does this means?
this produced errors;
The name 'StatusRow1_Screenshot2_Options' does not exist in the current context (CS0103)
The name 'StatusRow1_Screenshot2' does not exist in the current context (CS0103)
What does this means?
- RobinHood42
- Posts: 324
- Joined: Fri Jan 09, 2015 3:24 pm
Re: How to set variable based on image
Hi,
Since the code I posted was a short sample, you need to adapt the code to fit your existing items.
The error itself means that the StatusRow1_Screenshot2 does not exist in the class/namespace/scope. Please find more information about the CS0103 message on the MSDN site.
Cheers,
Robin
Since the code I posted was a short sample, you need to adapt the code to fit your existing items.
The error itself means that the StatusRow1_Screenshot2 does not exist in the class/namespace/scope. Please find more information about the CS0103 message on the MSDN site.
Cheers,
Robin