Ask a Question

Test a web page with amCharts trend graph

SOLVED
simonaferrara
Contributor

Test a web page with amCharts trend graph

Hi all,

 

I've got a web page that displays a trend graph developed with amCharts.

I'm worried it is possible to do automatic tests with Test Complete on this trend graph (or, in general, also with the integration of Selenium or similar).

 

As an example: I'm trying using xPaths, I would to check the displayed values within the x and y axes. But (for the x and y axes values, for example, they are "TextNode" elements within a "SVG" tree, but the indexes of the test nodes seems taken randomically and basing on the browser window size, so I cannot be sure to take and check my expected value, moreover some textnodes within object browser contains values that are not displayed within the page; so I've not find a way to be sure that I'm taking values that are actually displayed and I cannot be sure that a specific textnode index contains the first and/or last values on the x/y axes.

 

simonaferrara_0-1613036726349.png

 

In general, is there a way easier and reliable to test the amCharts?

 

Thanks,

Simona

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: Test a web page with amCharts trend graph

Hi,

 

The content of <svg> element (or at least any TextNode one) might inspire with some ideas... however... considering description of <svg> element and examples provided (https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_In_HTML_Introduction) I am far not sure that the task been discussed (reliably compare figures rendered on web page with the expected figures) can be (easily) done using TestComplete means.

To check static values, one may consider something like visual testing (Applitools Eyes or Percy, for example).

For dynamic values I don't have any good idea at the moment except to talk to developers and ask them for some piece of advise.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

2 REPLIES 2
sonya_m
Community Manager

Re: Test a web page with amCharts trend graph

Thank you for this question @simonaferrara 

 

@AlexKaras @tristaanogre @tphillips could you have a look at this thread? Your help is appreciated🙂


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
AlexKaras
Community Hero

Re: Test a web page with amCharts trend graph

Hi,

 

The content of <svg> element (or at least any TextNode one) might inspire with some ideas... however... considering description of <svg> element and examples provided (https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_In_HTML_Introduction) I am far not sure that the task been discussed (reliably compare figures rendered on web page with the expected figures) can be (easily) done using TestComplete means.

To check static values, one may consider something like visual testing (Applitools Eyes or Percy, for example).

For dynamic values I don't have any good idea at the moment except to talk to developers and ask them for some piece of advise.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: