Example usage for org.openqa.selenium.remote DriverCommand CLICK_ELEMENT

List of usage examples for org.openqa.selenium.remote DriverCommand CLICK_ELEMENT

Introduction

In this page you can find the example usage for org.openqa.selenium.remote DriverCommand CLICK_ELEMENT.

Prototype

String CLICK_ELEMENT

To view the source code for org.openqa.selenium.remote DriverCommand CLICK_ELEMENT.

Click Source Link

Usage

From source file:com.smash.revolance.ui.materials.mock.webdriver.handler.JSonWireController.java

License:Open Source License

@POST
@Path("/session/{sessionId}/element/{elementId}/click")
@Produces(MediaType.APPLICATION_JSON)/*from  ww w .  ja  v  a  2s  . c  o m*/
@Consumes(MediaType.APPLICATION_JSON)
public Response clickOnElement(@PathParam("sessionId") String sessionId,
        @PathParam("elementId") String elementId, String payload) {
    ElementCommand cmd = new ElementCommand(sessionId, DriverCommand.CLICK_ELEMENT, "POST", payload, elementId);
    CommandResult cmdResult = new CommandExecutor(cmd, getPath()).execute();
    return new CommandResponse(cmdResult).buildResponse();
}