Selenium で Intaractctions を使う

メモ:
Selenium で動かしたい機能が、Autocomplete Widget | jQuery UI API Documentation なんかを使っていて、単に要素の Click では、上手く動かなくて、マウスでのクリックをエミュレートしたい場合に。

WebDriver: Advanced Usage — Selenium Documentation のドキュメントが未だ TODO だったので、
AdvancedUserInteractions - selenium - How to use the Advanced User Interactions API - Browser automation framework - Google Project Hosting を参考にしました。
org.openqa.selenium.interactions パッケージの使い方が載っています。
指定の要素に対してマウスクリックを実行したい場合は、こんな感じですね。

Action mouseClick = new Actions(driver).click(element).build();
mouseClick.perform();

上記のサイトにも載っていますが、Actions をチェーンさせて複数のインタラクションを実行出来るようです。*1

*1:Drag&Drop とか