Page 1 of 1

How to grab SVG elements using Ranorex ?

Posted: Fri Aug 26, 2016 7:10 pm
by diwakar_224
I'm using Ranorex 6.0.1 version and trying to do some testing on graphs made by SVG in HTML 5.

When I'm using spy, I'm getting outer container and graph axis values but not rectangle/tooltip values. How to we work with SVG elements. Any help is appreciated.

Due to security reasons I'm unable to attach any snapshot.

Thanks.

Re: How to grab SVG elements using Ranorex ?

Posted: Fri Aug 26, 2016 7:21 pm
by krstcs
Without a snapshot it will be almost impossible to give any meaningful help as far as Ranorex is concerned.

What do you mean by "grab"?
When you say SVG are you talking about Scalable Vector Graphics images?

Please be more specific about exactly what you are trying to accomplish, including the test scenario. There may be a better way to do what you are actually needing.


Having said that, typically with graphics, unless the element is specially designed with automation in mind, the only way to "do" anything with it is by using image validation. However, with SVG that can be problematic because of the scaling algorithms used. My understanding is that it is recommended to only use uncompressed bitmaps as they are a 1:1 relationship when the same size.

Re: How to grab SVG elements using Ranorex ?

Posted: Fri Aug 26, 2016 8:52 pm
by diwakar_224
Thanks for the reply.

Grab means I need to have path for all the elements inside a graph made by SVG. I want to click on the rectangles/or any figure, get the tooltip value.

Yes, I'm talking about Scalable Vector Graphics.

I've a graph made with SVG in HTML5. When I hover on any shape within x-y axis, javascript enables tooltip and I want to capture the value of that tooltip.

I've searched entire web and tried many things to make this work. Now my question is does SVG elements are recognized my Ranorex ? From Ranorex 3.3.4 onward features were added to support the same. But I'm not sure how to use them. Can anyone provide any links for any documentation for this ? Any help is appreciated.

Thanks,
Diwakar

Re: How to grab SVG elements using Ranorex ?

Posted: Tue Aug 30, 2016 12:56 pm
by odklizec
Hi,

There is definitely no direct way to recognize SVG elements with Ranorex. The only way how to make Ranorex to recognize SVG elements is to implement accessibility to your app displaying the SVG objects. I've posted some general suggestions in these posts:
http://www.ranorex.com/forum/ranorex-fo ... tml#p37037
http://www.ranorex.com/forum/image-base ... tml#p32681