Forum Discussion

simonaferrara's avatar
simonaferrara
Frequent Contributor
4 years ago
Solved

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.

 

 

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

 

Thanks,

Simona

 

 

 

  • 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.

     

2 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    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.