使用selenium测试画布对象

使用selenium测试画布对象,selenium,canvas,Selenium,Canvas,我必须用画布对象测试网页。我需要测试覆盖画布对象中的数据点时显示的工具提示文本 如何获取X,Y数据点 如何将鼠标移动到X,Y您可以使用moveToElement方法,在java中,它看起来如下所示: Actions builder = new Actions(driver); builder.moveToElement(knownElement, 10, 25).click().build().perform(); 你试过了吗?

我必须用画布对象测试网页。我需要测试覆盖画布对象中的数据点时显示的工具提示文本

如何获取X,Y数据点
如何将鼠标移动到X,Y

您可以使用
moveToElement
方法,在java中,它看起来如下所示:

Actions builder = new Actions(driver);   
builder.moveToElement(knownElement, 10, 25).click().build().perform();

你试过了吗?