How to parsing svg elements in Edge

Best practices, code snippets for common functionality, examples, and guidelines.
Sergii.Pankrashyn
Posts: 7
Joined: Mon Sep 10, 2018 9:17 am

How to parsing svg elements in Edge

Post by Sergii.Pankrashyn » Tue Oct 16, 2018 11:34 am

Hi guys, I use new version of Ranorex 8.3 which support EDGE

I have a problem with SVG elements, when I try to search some elements in tag SVG, ranorex spy can't find the elements.

However, in Chrome or Firefox, it search works fine

On the link I add video with presentation it behavior
https://www.dropbox.com/s/9tr3q7mv1fqss ... s.mp4?dl=0

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

Re: How to parsing svg elements in Edge

Post by odklizec » Tue Oct 16, 2018 12:09 pm

Hi,

It would be helpful if you post a Ranorex snapshot (not screenshot) of the page, taken both in Edge and Chrome/FF. Thanks.
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

Sergii.Pankrashyn
Posts: 7
Joined: Mon Sep 10, 2018 9:17 am

Re: How to parsing svg elements in Edge

Post by Sergii.Pankrashyn » Tue Oct 16, 2018 1:40 pm

Hi odklizec, in attach snapshots from edge and chrome
Attachments
svg-edge.rxsnp
(156.55 KiB) Downloaded 1 time
svg-chrom.rxsnp
(203.65 KiB) Downloaded 2 times

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

Re: How to parsing svg elements in Edge

Post by odklizec » Tue Oct 16, 2018 1:49 pm

Thanks. Now please post full xpath for elements, which are available in chrome and cannot be found in Edge. I don't want to recreate the xpaths from video ;)

It seems to me, that both snapshots contain all required information? For example, below xpath returns 4 'eOa' elements, both in Edge and Chrome snapshot...
/dom[@domain='sapp-dev-fe-01.ell.fnt.de']//div[#'graphic_matrix']//div//tag[@innertext='eOa']
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

Sergii.Pankrashyn
Posts: 7
Joined: Mon Sep 10, 2018 9:17 am

Re: How to parsing svg elements in Edge

Post by Sergii.Pankrashyn » Tue Oct 16, 2018 2:00 pm

if I understand you correctly

base is /dom[@caption='CmdHtml']
section with svg .//tag[@id='graphic_matrix']//tag[@tagname='svg'] - this element not available in edge
element in svg tag[@tagname='g']/tag[3] - this element not available in edge

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

Re: How to parsing svg elements in Edge

Post by odklizec » Tue Oct 16, 2018 2:05 pm

I still don't see any difference? This xpath returns the same number of elements in both browsers:
/dom[@caption='CmdHtml']//tag[@id='graphic_matrix']//tag[@tagname='svg']//tag[@tagname='g']/tag[3]
ChromeEdge.png
ChromeEdge.png (103.71 KiB) Viewed 47 times
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

Sergii.Pankrashyn
Posts: 7
Joined: Mon Sep 10, 2018 9:17 am

Re: How to parsing svg elements in Edge

Post by Sergii.Pankrashyn » Tue Oct 16, 2018 2:28 pm

I see another picture
Image
Attachments
1.2.png
1.2.png (115.63 KiB) Viewed 45 times
1.png
1.png (97.21 KiB) Viewed 46 times

Sergii.Pankrashyn
Posts: 7
Joined: Mon Sep 10, 2018 9:17 am

Re: How to parsing svg elements in Edge

Post by Sergii.Pankrashyn » Tue Oct 16, 2018 2:35 pm

When I try to load the snapshot and then find an element by xpath, element correct finded.
but if I try use the element in a repository, I got error(

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

Re: How to parsing svg elements in Edge

Post by odklizec » Tue Oct 16, 2018 2:47 pm

Just in case, do you have both MicrosoftEdge and MicrosoftEdgeCP in the white list? Also, make sure you have the same settings in standalone Spy and Studio.
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