Page 1 of 1

HTML 5 Canvas issue

Posted: Wed Jan 25, 2017 1:40 pm
by nico
I am trying to automate this website: https://www.spotta.nl/folders/media-markt?fid=1679
A big portion of the view is a HTML 5 Canvas element.

I read some stuff about Canvas being just an image, but in this image viewer you can click left/right to see the previous image and there are a few links on this element.

However the Ranorex Spy can only see the canvas tag without any context nested underneath.

Is there a way to make the individual elements visible our should we rely on image based testing and/or manual inputs to control the viewer?

Used for the viewer is HTML5 (canvas element), jquery.

Windows 10
Ranorex 6.2.1


Snapshot is coming, too big for attachment.

Re: HTML 5 Canvas issue

Posted: Wed Jan 25, 2017 1:47 pm
by nico

Re: HTML 5 Canvas issue

Posted: Wed Jan 25, 2017 2:17 pm
by odklizec
Hi,

I'm afraid, there is no out-of-the-box solution for this problem. I would suggest to read this post, where you can find some suggestions from Ranorex support:
http://www.ranorex.com/forum/html5-how- ... t8341.html

Re: HTML 5 Canvas issue

Posted: Wed Jan 25, 2017 2:18 pm
by krstcs
As you said, a Canvas element is just an image. There are no elements inside it as far as the browser and Ranorex are concerned.

You can still use the Ranorex Mouse actions against the canvas element if you know that left/right clicking is supposed to work. It should still work correctly.

If you mean that there are left and right arrows on the canvas, then you can still use relative coordinate-based clicking. To do this, choose Center-Left or Center-Right, etc., from the list on the mouse click action.

I would use image-based automation only as a very last resort.