javascript - ubuntu 上的 Google Chrome 75.0.3770.80 上的 Selenium Actions moveToElement 不起作用

标签 javascript selenium selenium-chromedriver

选择了一个元素并想要 --> 将鼠标光标物理移动到它上面。

尝试使用selenium提供的Actions类。使用的方法是moveToElement()

Actions actions = new Actions(driver);
actions.moveToElement(element).build().perform();

使用的驱动程序版本是 ChromeDriver 75.0.3770.90。

预期:- 物理光标必须移动到元素位置。

最佳答案

升级到 Chrome 75 后我遇到了同样的问题。

Actions actions = new Actions(driver);
actions.moveToElement(element).build().perform();
element.click();

这确实解决了我的问题。

关于javascript - ubuntu 上的 Google Chrome 75.0.3770.80 上的 Selenium Actions moveToElement 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56615952/

相关文章:

javascript - 使用 JS 生成错误的 HTML 表

javascript - Appium - 滚动方法在 IOS 的横向模式下不起作用

ruby - 如何使用 Selenium 在 Ruby Capybara 中启用 ChromeDriver 日志记录?

java - 如何在前台打开 chrome 驱动程序(使用 Selenium Webdriver)。默认情况下它在没有焦点的背景中打开

python Selenium : move_to_element() not working

javascript - 如何在 jQuery .html() 函数中打印 javascript 数组值?

javascript - 我的 SVG 过滤器运行速度非常慢

JavaScript 原型(prototype),__proto__

java - webdriver中使用TestNG框架实现登录

python - StaleElementReferenceException selenium webdriver python