Page 1 of 1

HTML5: How to get value from Canvas tag binding data

Posted: Wed Aug 12, 2015 9:14 am
by hanguyen2009
Hi Ranorex,

I am trying validate value in cell of data grid that binding in to Canvas tag, but Ranorex Spy can not detected the cell in data grid in the Canvas tag as Table tag.

I need to know how to best capture this cell item for the repository so that I can verify if fields are populated or not.

Thanks a lot

Infor server:
Ranorex: 5.3.3
IE 11
Window 7

Re: HTML5: How to get value from Canvas tag binding data

Posted: Thu Aug 13, 2015 7:41 am
by odklizec
Hi,

Unfortunately, there seems to be no way to extract the individual cells from HTML5 canvas. I'm not quite sure if it's the Ranorex limitation, but I suspect it's rather the way your elements are drawn on canvas? As I understand it, the HTML5 canvas is just a container for graphics, which is dynamically drawn into it (typically by javascript). So there may be no way at all to extract the individual elements from the HMTL5 canvas. I would suggest to drop an email to [email protected].

Re: HTML5: How to get value from Canvas tag binding data

Posted: Thu Aug 13, 2015 4:00 pm
by krstcs
As Pavel said, the Canvas tag in HTML doesn't have data, it contains an image that is rendered. Ranorex cannot do anything with it except for image validation.

Re: HTML5: How to get value from Canvas tag binding data

Posted: Fri Aug 14, 2015 8:13 am
by Support Team
Hi hanguyen2009,

They are true, since the data will be rendered, you cannot directly access it.

It may just be possible to somehow access the data by using JavaScript, but this also highly depends on your web page and where the original data is stored.
In general you can execute JavaScript by using the ExecuteScript method of the WebDocument, IFrame or FrameTag element, depending on the structure of your web site.
Besides that, I am afraid there is nothing we can do about it.

Regards,
Markus