Skip to content

Commit

Permalink
Updating IE driver element tag name command handler to be spec compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Nov 28, 2017
1 parent 021e661 commit 034519f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ void GetElementTagNameCommandHandler::ExecuteInternal(
return;
} else {
std::string element_id = id_parameter_iterator->second.asString();

BrowserHandle browser_wrapper;
int status_code = executor.GetCurrentBrowser(&browser_wrapper);
if (status_code != WD_SUCCESS) {
response->SetErrorResponse(ERROR_NO_SUCH_WINDOW, "Unable to get browser");
return;
}

ElementHandle element_wrapper;
int status_code = this->GetElement(executor, element_id, &element_wrapper);
status_code = this->GetElement(executor, element_id, &element_wrapper);
if (status_code == WD_SUCCESS) {
std::string return_value = element_wrapper->GetTagName();
response->SetSuccessResponse(return_value);
Expand Down

0 comments on commit 034519f

Please sign in to comment.