LoginSignup
1
1

More than 5 years have passed since last update.

Geb 右クリックのコード

Posted at

Gebで右クリックを実装した時のサンプルコードです。

// 対象要素を取得
def target = $("#target")

// 対象要素を右クリック
interact {
    contextClick(target)
}

waitFor {
    // 右クリックで表示されるコンテキストメニューをウェイト
    $("#contextMenu1").displayed
}

// コンテキストメニューをクリック
$("#contextMenu1").click()

試してはいませんが、interactの内には次のページのメソッドも実行できると思います。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1