Page 1 of 1

Image based operation

Posted: Fri Jun 12, 2015 11:47 am
by subodh4u7
Hello Experts,
I have one scenario here:

1. I have one blank segment in which some where image is displayed as attached for reference.
2. I want to perform Zoom/Pan operation on the image using left mouse button.

I am facing some problem
1. How to identify the image starting points and end points in the blank layout. Any code ??
2. is there any api which can be used for zooming / panning. Any code ???
3. Spy captures the whole segment as element, not the image inside the layout.

I can not share my ranorex screenshot and ranorex repo since due to company constraints.

I am not able to add the file. May be some issue. will add later

Please help me out

Re: Image based operation

Posted: Fri Jun 12, 2015 1:49 pm
by CookieMonster
Hi,

CouLd you please provide a bit more information about your SUT, also the technology Web, Win32....

Regards
Dan

Re: Image based operation

Posted: Mon Jun 15, 2015 5:06 am
by subodh4u7
Its windows based, 64 bit application,WPF techncology (C#).

The whole black area is one segment in which white image is displayed. When i do spy the whole area is added not only the image inside.

Re: Image based operation

Posted: Mon Jun 15, 2015 7:26 am
by odklizec
Hi,

As for pan/zoom actions, as far as I know, there is nothing like this implemented in Ranorex. What you can do is "mouse wheel" action with defined scroll orientation (horizontal/vertical) and delta value. Anything else (more specific) regarding zooming images needs to be implemented by you via user code.

As for recognizing objects inside image (via spy/recorder), this cannot be done, since image is just image. Your only hope is using image recognition features built in Ranorex. You can find more info about image-based automation here:
http://www.ranorex.com/support/user-gui ... ation.html
http://www.ranorex.com/support/screencasts.html#c2529

In a theory, if the window containing the image elements is something like a "canvas" (Ranorex snapshsot would be extremely helpful here), it could be possible to implement accessibility to the individual graphic elements inside this canvas. So then Ranorex could recognize the individual elements "painted" on canvas. We did something like this in my previous job, so it's definitely possible. It just requires some high-level coding skills and knowledge of things like subclassing ;) For more details about implementing accessibility to 3rd party controls (and controls in general) check these posts:
http://www.ranorex.com/blog/enabling-au ... s-controls
http://www.ranorex.com/blog/enabling-au ... essibility
http://www.ranorex.com/forum/issue-cad- ... tml#p30388