Skip to content

Commit

Permalink
Updating IE error response to be spec compliant for sendKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Mar 6, 2018
1 parent 766a4cd commit c6a2b9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpp/iedriver/CommandHandlers/SendKeysCommandHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,14 @@ void SendKeysCommandHandler::ExecuteInternal(
bool displayed;
status_code = element_wrapper->IsDisplayed(true, &displayed);
if (status_code != WD_SUCCESS || !displayed) {
response->SetErrorResponse(EELEMENTNOTDISPLAYED,
"Element is not displayed");
response->SetErrorResponse(ERROR_ELEMENT_NOT_INTERACTABLE,
"Element cannot be interacted with via the keyboard because it is not displayed");
return;
}

if (!element_wrapper->IsEnabled()) {
response->SetErrorResponse(EELEMENTNOTENABLED,
"Element is not enabled");
response->SetErrorResponse(ERROR_ELEMENT_NOT_INTERACTABLE,
"Element cannot be interacted with via the keyboard because it is not enabled");
return;
}

Expand Down

0 comments on commit c6a2b9a

Please sign in to comment.