我想知道Action
之间的区别和 Actions
在 Selenium
最佳答案
行动:
在 Selenium
, Action
是表示单个用户交互操作的界面。它在 org.openqa.selenium.interactions
中定义.它包含使用最广泛的方法之一 perform()
.您可以在此 link
中找到有关实现类和方法的更多信息.
Action 示例:
在下图中,如果我们将鼠标悬停在关键字 Action
,紫罗兰色 I
表示 Action
是一个接口(interface)。
行动:
在 Selenium
, Actions
是一个类。它在 org.openqa.selenium.interactions
中定义.这是用于模拟复杂用户手势的面向用户的 API。 Actions
类实现了构建器模式,它可以构建一个包含方法调用指定的所有操作的 CompositeAction。您可以在此 link
中找到有关方法摘要的更多信息.
操作示例:
在下图中,如果我们将鼠标悬停在关键字 Actions
, 绿色 C
表示 Actions
是一个类。
关于selenium - Selenium 中的 Action 和 Actions 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45492229/