我有一个这样的图形:https://www.highcharts.com/demo/spline-plot-bands
当我试图获取每个点内的信息时,我遇到了问题。我的工具提示在点上,Selenium不识别点并返回错误:"org.openqa.selenium.WebDriverException: Element is not clickable at point (422.01666259765625, 429.73333740234375). Other element would receive the click: <rect height="450" width="540" y="0" x="0" fill="#FFFFFF" ry="5" rx="5"></rect> (WARNING: The server did not provide any stacktrace information)"
案例如下:
我以这种方式获得点信息:
WebElement element = driver.findElement(By.xpath(dot));
// action class to click dot
Actions action = new Actions((WebDriver) driver);
action.click(element).build().perform();
// get info;
String toolTipText = driver.findElement(By.xpath(tooltip)).getText();
任何想法我怎么能解决这个问题? 您必须知道仅使用Jenkins服务器才会发生这种情况。从我的本地计算机上,我没有收到此错误。
非常感谢你的帮助。
答案 0 :(得分:0)
错误消息告诉您问题是什么...您正在尝试单击另一个元素覆盖的元素(另一个元素将接收到该单击)。在尝试单击点之前,您需要解雇或以其他方式删除工具提示(单击其他位置等)。
你在机器上没有看到它但在Jenkins盒子上看到的最可能的原因是两台机器上的屏幕分辨率不同。