针对页面上的二级菜单,需要鼠标悬停才能进行操作。

/**
   * Clicks (without releasing) in the middle of the given element. This is equivalent to:
   * <i>Actions.moveToElement(onElement).clickAndHold()</i>
   *
   * @param onElement Element to move to and click.
   * @return A self reference.
   */
  public Actions clickAndHold(WebElement onElement) {
    action.addAction(new ClickAndHoldAction(mouse, (Locatable) onElement));
    return this;
  }
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-20
  • 2021-06-07
  • 2022-12-23
  • 2021-11-21
  • 2021-08-01
  • 2021-05-18
猜你喜欢
  • 2021-09-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2021-08-21
相关资源
相似解决方案