Unable to assert axis label text in highcharts using Geb
问题 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. 回答1: If for whatever reason geb isn't supporting your phantomjs driver properly, you can always execute a javascript