selenium - Selenium 中的 Action 和 Actions 有什么区别?

标签 selenium

我想知道Action之间的区别和 Actions在 Selenium

最佳答案

行动:
Selenium , Action 是表示单个用户交互操作的界面。它在 org.openqa.selenium.interactions 中定义.它包含使用最广泛的方法之一 perform() .您可以在此 link 中找到有关实现类和方法的更多信息.
Action 示例:
在下图中,如果我们将鼠标悬停在关键字 Action ,紫罗兰色 I 表示 Action是一个接口(interface)。
InterfaceAction

行动:
Selenium , Actions 是一个类。它在 org.openqa.selenium.interactions 中定义.这是用于模拟复杂用户手势的面向用户的 API。 Actions 类实现了构建器模式,它可以构建一个包含方法调用指定的所有操作的 CompositeAction。您可以在此 link 中找到有关方法摘要的更多信息.
操作示例:
在下图中,如果我们将鼠标悬停在关键字 Actions , 绿色 C 表示 Actions是一个类。
enter image description here

关于selenium - Selenium 中的 Action 和 Actions 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45492229/

相关文章:

ruby - 如何在 selenium-webdriver 中获取窗口标题、ID 和名称?

selenium - 如何处理 Selenium 中的模态对话框?

python Selenium "Chrome is being controlled by automated test software"

java - 在 Chrome 64 中允许访问相机和麦克风

java - Selenium Chromedriver 超时窗口关闭

java - 如何在 Selenium 2.53.1 中将我的 Firefox 浏览器设置为私有(private)模式?

java - 在不同的 chrome 选项卡中运行测试方法

selenium - 如何使用 selenium 更改 IE 上的浏览​​器模式?

testing - 使用 selenium 的对话框操作

java - 使用 selenium 进行网页自动化期间链接未打开