vendredi 17 février 2017

Splinter mouse over Highcharts chart

I have 2 charts in highcharts that I want to test with splinter. One is sparkline (e.g. http://ift.tt/1IPCQkY) and the other is a basic line chart (e.g. http://ift.tt/1tgIJmw).

I test sparkline like this:

browser.find_by_tag('svg')[0].mouse_over()
browser.find_by_tag('svg')[0].mouse_over()
assert b.is_text_present('tooltip text ...')

As you can see I need to call mouse_over() 2 times. I don't know why but if I just call it 1 time it the tooltip wont show.

The second problem that I have is with the 2nd chart (basic line chart). I don't know how to do mouse over on the line in chart so that tooltip will get displayed. i.e. what is the proper way to test if line chart is correctly rendered.

Aucun commentaire:

Enregistrer un commentaire