我正在尝试使用https://github.com/Ardesco/Powder-Monkey/blob/master/src/main/java/com/lazerycode/selenium/graphs/LineChart.java代码来测试高亮图的工具提示值。但是我收到了错误:
“线程中的异常”主“ org.openqa.selenium.NoSuchElementException:无法找到元素: {“method”:“css selector”,“selector”:“g.highcharts-series-group> G:第n个孩子(1) “}”
WebDriver driver = new FirefoxDriver();
String baseUrl = "http://www.highcharts.com/demo/line-basic";
// launch Firefox and direct it to the Base URL
driver.get(baseUrl);
WebElement highChartSVGElement = driver.findElement(By.className("highcharts-container"));
LineChart chartObject = new LineChart(driver, highChartSVGElement);
if(chartObject.isChartDisplayed() && chartObject.isTooltipDisplayed()) {
chartObject.hoverOverPointOfGraphAtXAxisLabel("Jan");
}