How to grab SVG elements using Ranorex ?

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
diwakar_224
Posts: 4
Joined: Thu Aug 18, 2016 6:15 pm

How to grab SVG elements using Ranorex ?

Post by diwakar_224 » Fri Aug 26, 2016 7:10 pm

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.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How to grab SVG elements using Ranorex ?

Post by krstcs » Fri Aug 26, 2016 7:21 pm

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.
Shortcuts usually aren't...

diwakar_224
Posts: 4
Joined: Thu Aug 18, 2016 6:15 pm

Re: How to grab SVG elements using Ranorex ?

Post by diwakar_224 » Fri Aug 26, 2016 8:52 pm

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

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

Re: How to grab SVG elements using Ranorex ?

Post by odklizec » Tue Aug 30, 2016 12:56 pm

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
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