Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test svg pie charts and graphs using protractor?

I was wondering if some one could direct me how to test svg pie charts and graphs using protractor .

I have to read data on pie charts when hovered on it or read data on graphs when hovered to the data points .

The pie chart is very similar to following one except for the text data. CHeck 2D pie chart example: http://www.fusioncharts.com/charts/pie-doughnut-charts/

like image 375
user3482804 Avatar asked Mar 10 '15 20:03

user3482804


1 Answers

I get the data by xpath - though it's a bit different than normal. To get access to svg:

element(by.xpath('//*[name() = "svg"]//the rest of the path'))
like image 147
Zach Folwick Avatar answered Oct 13 '22 22:10

Zach Folwick