This is a migrated thread and some comments may be shown as answers.

Automating charts with selenium

3 Answers 114 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Casper
Top achievements
Rank 1
Casper asked on 07 Oct 2015, 07:12 AM

We are using Selenium and running our UI tests with BrowserStack.

In our application the user can configure charts to display whatever data she feels like.

In our tests we need to create a chart configuration, mock appropriate data and verify that the data is shown in the chart.

We need to be able to find each datapoint and its associated value.

This was possible in HighCharts where a class is added to all the datapoints (and labels, titles etc.) and thus queryable with Selenium.

I have seen elsewhere that the recommendation is to use the "d" attribute of the path elements but this is not a reasonable solution as we are testing on several different platforms and the value of the "d" attribute does not appear to be constant.

 

How do you propose we solve this with Selenium?

Thanks,

Casper

3 Answers, 1 is accepted

Sort by
0
Atanas Georgiev
Telerik team
answered on 07 Oct 2015, 03:12 PM
Hello Casper,

You can implement the assertions in your functional tests by using the Chart API and executing JavaScript via Selenium.

As we do not officially support Selenium, we recommend you to check out Telerik TestStudio – a test automation product with built in Kendo UI translators. More detailed information can be found at: http://www.telerik.com/automated-testing-tools/campaigns/testing-kendoui-apps.aspx. Unfortunately, at this point translators for Kendo UI Chart are still not available.

Regards,
Atanas Georgiev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Casper
Top achievements
Rank 1
answered on 08 Oct 2015, 07:06 AM

Thanks,

So you suggest that we e.g. count the number of points either in the datasource or in the series array? Depending on how data has been added to the chart.

It would be handy if there were methods in the API for getting datapoints and selecting them etc.

I'll give it a try.

0
Atanas Georgiev
Telerik team
answered on 08 Oct 2015, 12:53 PM
Hello Casper,

I believe you will be able to implement many of the verifications in your use cases using the API. Please submit your ideas as feature requests at our UserVoice portal - this way the community will be able to evaluate them and we will consider them for future releases, depending on their popularity and business value. Thank you in advance.


Regards,
Atanas Georgiev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Casper
Top achievements
Rank 1
Answers by
Atanas Georgiev
Telerik team
Casper
Top achievements
Rank 1
Share this question
or