Issue 6441 in selenium: Unable to access svg path tags using webdriver on Firefox and IE browsers.

445 views
Skip to first unread message

sele...@googlecode.com

unread,
Oct 22, 2013, 3:57:22 AM10/22/13
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 6441 by swaminad...@gmail.com: Unable to access svg path tags
using webdriver on Firefox and IE browsers.
http://code.google.com/p/selenium/issues/detail?id=6441

Hello,

Can any help me to access the svg elements using selenium webdriver. I was
able to click on the svg elements that contains svg circles, but i was not
able to access svg paths. Here are the following thing i have tried out.

1. Tried using xpath locator and when we try to check the visibility it is
returning true, but we are not able to click on the bubble.

Xpath Locator:

element :path_click, Proc.new {|
index| "//div[@id='views-by-date']//div//[local-name()='svg']//[local-name()='g'][5]//[local-name()='g'][2]/[local-name()='path'][#
{index}]"}

2. Tried using CSS locator and even with this, webdriver is able to locate
the element. but unable to click on the bubble.

CSS Locator :
element :path_click, "css=g.highcharts-tracker > g > path"

3.Tried using javascript commands by using execute_script API, we are able
to get the attributes of the "path" tag under the "g" tag, but we are not
able to perform any operation on the element.

JS :
document.getElementsByClassName('highcharts-markers')[0].childNodes.item(0)

4. Tried using keyboard events and didn't worked as well.

Accessing svg tag elements is bit tough in firefox, if it a circle tag of
svg, then we have proper javascript support. Since i am using the "path"
tag i am unable to click on bubble element.


What steps will reproduce the problem?
1. Take any svg path elements.
2 Try to click the svg path elements.

Expected Result : Should be able to access the svg path tags.
Actual Result : Unable to access svg path tags.


Selenium version: 2.35.0
OS: Linux(Ubuntu), OSX(Lion)
Browser: FF, IE
Browser version: FF(21,23,24), IE(8,9,10)


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sele...@googlecode.com

unread,
Oct 22, 2013, 4:15:28 AM10/22/13
to selenium-develope...@googlegroups.com
Updates:
Status: NeedsClarification

Comment #1 on issue 6441 by barancev: Unable to access svg path tags using
webdriver on Firefox and IE browsers.
http://code.google.com/p/selenium/issues/detail?id=6441

Please provide a complete executable scenario and a page where the issue
can be reproduced.

sele...@googlecode.com

unread,
Nov 22, 2013, 2:27:39 AM11/22/13
to selenium-develope...@googlegroups.com

Comment #2 on issue 6441 by cfnj...@gmail.com: Unable to access svg path
tags using webdriver on Firefox and IE browsers.
http://code.google.com/p/selenium/issues/detail?id=6441

I also hit the same issue with Selenium IDE 2.4.0. IDE couldn't find the
child element of svg (included) from a xpath locator. E.g.,
//svg
//circle[@class='clsname']

But //*[@class='clsname'] does work.

That should be easy to be reproduced.
Selenium version: 2.37.0
OS: Windows server 2003 (64bit)
Browser: FF
Browser version: FF(25)

sele...@googlecode.com

unread,
Jan 4, 2014, 7:27:03 PM1/4/14
to selenium-develope...@googlegroups.com

Comment #3 on issue 6441 by tpan...@gmail.com: Unable to access svg path
tags using webdriver on Firefox and IE browsers.
http://code.google.com/p/selenium/issues/detail?id=6441

Hello,
I am currently evaluating Selenium for our testing. i see some you had some
issues with svg child elements and paths.
I do not have much experience with Selemium , and just wondering if you
have been able to work around the issue. Thanks,

sele...@googlecode.com

unread,
Jan 6, 2014, 1:07:01 AM1/6/14
to selenium-develope...@googlegroups.com

Comment #4 on issue 6441 by swaminad...@gmail.com: Unable to access svg
path tags using webdriver on Firefox and IE browsers.
http://code.google.com/p/selenium/issues/detail?id=6441

For SVG circle tags, i dont see any problem. But make sure your xpath
returns one element.

my xpath : //[local-name()='svg']//[local-name()='circle'][3].

I was able to identify the element. But in some cases click action is not
getting performed on the svg circle tags, In those instances double click
worked for me.

sele...@googlecode.com

unread,
Jan 30, 2014, 3:12:55 AM1/30/14
to selenium-develope...@googlegroups.com
Updates:
Status: Invalid
Labels: -Status-Untriaged

Comment #5 on issue 6441 by barancev: Unable to access svg path tags using
webdriver on Firefox and IE browsers.
http://code.google.com/p/selenium/issues/detail?id=6441

Closing the issue as there is no reproduction case provided.

sele...@googlecode.com

unread,
Jul 28, 2014, 9:48:46 AM7/28/14
to selenium-develope...@googlegroups.com

Comment #6 on issue 6441 by rahulgad...@gmail.com: Unable to access svg
path tags using webdriver on Firefox and IE browsers.
http://code.google.com/p/selenium/issues/detail?id=6441

I am also facing the same issue please do let me know if there is any
workaround to identify the elements with tags..
//svg
//circle[@class='clsname']---------Will not work

But //*[@class='clsname']----------Will work

More over when an identified element is evaluated using IDE, element is not
highlighted but the corresponding text in html is highlighted.
Selenium version: 2.37.0
Browser: FF
Browser version: FF(25)

Reply all
Reply to author
Forward
0 new messages