答案 0 :(得分:1)
你必须要做一些事情......
barIndex
指定)我测试了下面的代码。
int barIndex = 3;
WebDriver driver = new FirefoxDriver();
driver.get("http://demos.telerik.com/kendo-ui/bar-charts/index");
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("g[clip-path] path")));
List<WebElement> bars = driver.findElements(By.cssSelector("g[clip-path] path"));
System.out.println(bars.size());
new Actions(driver).moveToElement(bars.get(barIndex)).build().perform();
WebElement tooltip = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div.k-tooltip.k-chart-tooltip")));
System.out.println(tooltip.getText().trim());
答案 1 :(得分:0)
当您将图表鼠标悬停时,会显示div
class=k-tooltip k-chart-tooltip
driver.findElement(By.className("k-tooltip k-chart-tooltip")).getText();
。鼠标悬停代码后,运行以下代码:
gulp.task('appjs', function(){
browserify({ debug: true })
.transform(babel.configure({stage: 0}))
.require(source.appjs, { entry: true })
.bundle()
.pipe(vsource('app.min.js'))
.pipe(gulp.dest('./ui-dist'));
});
gulp.task('buildapp', function(){
browserify({ debug: false })
.transform(babel)
.require(source.appjs, { entry: true })
.bundle()
.pipe(vsource('app.min.js'))
.pipe(vbuffer())
.pipe(uglify())
.pipe(gulp.dest('./ui-dist'));
});