Simulate Mouse Actions

Click, key + click, and hover over elements.

CommandExamplesExplanation

click <locator>

click button "Submit"

Clicks the element at the given location. If the control (or ctrl), shift, or command (or cmd) modifiers are present, simulates the user holding down those keys while clicking.

command click <locator>command click link "Contact Us"
control click <locator>control click option "A" in dropdown with id "dropdownId"
shift click <locator>shift click option "C" in dropdown with id "dropdownId"
hover over <locator>hover over link "Menu"If the web app you are testing changes in response to hover events, then use this command to simulate hovering over an element to force that change to occur.