public WebDriverResponse Post(ClickElementRequest request) { var session = _sessionRepository.GetById(request.SessionId); _automationService.Click(session, request.ElementId); return(new WebDriverResponse(session) { Status = StatusCode.Success }); }
public void ClickElement(Guid elementId) { var request = new ClickElementRequest(elementId); var response = Post <ClickElementRequest, ClickElementResponse>(request); if (!response.IsValid()) { throw new Exception("Could not click element: Invalid response"); } if (!response.Success) { throw new Exception("Could not click element: Element not found?"); } }