I am writing a geb test that asserts the axis labels in a highcharts graph.
The test I wrote works when run with the selenium chrome driver. When I run with phantomjs it fails.
//Selector in GEB
$(id:"graph-id").find("g.highcharts-legend-item").find("tspan").text()
This returns as expected in Chrome. It returns empty in phantomjs.
We have to use phantomjs for our CI builds.
We resolved the issue by reverting the version of phantomjs from 1.9.7 to 1.9.1 and the following library dependencies:
If for whatever reason geb isn't supporting your phantomjs driver properly, you can always execute a javascript selector directly through the browser:
Which will give you a list of geb navigators which point to the selected elements.
I don't have phantomjs on my machine but can you please try this and update us whether it's working or not?