Image based operation

Ask general questions here.
User avatar
subodh4u7
Posts: 68
Joined: Tue Jan 06, 2015 8:26 am

Image based operation

Post by subodh4u7 » Fri Jun 12, 2015 11:47 am

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
Regards,
Subodh

CookieMonster
Certified Professional
Certified Professional
Posts: 74
Joined: Mon Aug 14, 2006 7:17 pm
Location: CH

Re: Image based operation

Post by CookieMonster » Fri Jun 12, 2015 1:49 pm

Hi,

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

Regards
Dan

User avatar
subodh4u7
Posts: 68
Joined: Tue Jan 06, 2015 8:26 am

Re: Image based operation

Post by subodh4u7 » Mon Jun 15, 2015 5:06 am

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.
Attachments
Sample.jpg
Sample.jpg (17.76 KiB) Viewed 929 times
Regards,
Subodh

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3916
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Image based operation

Post by odklizec » Mon Jun 15, 2015 7:26 am

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
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration