Does watir support svg

295 views
Skip to first unread message

al3kc

unread,
Sep 14, 2011, 11:41:02 AM9/14/11
to Watir General
Hi,

I have the following svg element in the page

<table>
<div>
<svg>
<rect>
<rect>

I want to access rect elements. I use element_by_xpath but i can only
access "//table/div" element. When I use "//table/div/svg" I get
error that elemt does not exists. Thought when I do
element_by_xpath( "//table/div").html I can see svg and rect elements
in output. Does watir support svg at all? Any ideas how to access svg
in other way?

joedio

unread,
Sep 14, 2011, 8:48:28 PM9/14/11
to Watir General
I don't think Watir does. Even watir-webdriver which supports a wider
set of HTML tags doesn't list <svg> or <rect> as a supported HTML tag.

http://rubydoc.info/gems/watir-webdriver/0.3.3/Watir/HTMLElement

Joe

Jari Bakken

unread,
Sep 15, 2011, 5:16:22 AM9/15/11
to watir-...@googlegroups.com
Even though the SVG elements aren't part of the API, you can still access them as generic elements (at least in watir-webdriver):


Jari

 
Reply all
Reply to author
Forward
0 new messages