gpt4 book ai didi

java - 如何使用 selenium java 将鼠标悬停在圆环图弧上?

转载 作者:行者123 更新时间:2023-12-01 19:33:18 27 4
gpt4 key购买 nike

有一个如下所示的圆环图

enter image description here

当我将鼠标悬停在彩色弧上时,它将显示如下

enter image description here

其html代码如下enter image description here

我使用了 actions 类的 mousehover 但没有用。有人可以帮忙吗

最佳答案

不确定为什么操作类不起作用。您是否尝试过操作类中的 moveToElement

  WebElement donut =driver.findElement(By.xpath("//svg//circle[@class='AdvisoriesPopoverWidget donut']"));
Actions action = new Actions(driver);
action.moveToElement(donut).perform();

关于java - 如何使用 selenium java 将鼠标悬停在圆环图弧上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59243359/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com