Skip to content

Commit

Permalink
Replacing strings with #define constant in IE driver
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Feb 9, 2018
1 parent 0aaeb47 commit f9d99f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void SwitchToFrameCommandHandler::ExecuteInternal(
if (frame_id.isNull()) {
status_code = browser_wrapper->SetFocusedFrameByElement(NULL);
} else if (frame_id.isObject()) {
Json::Value element_id = frame_id.get("element-6066-11e4-a52e-4f735466cecf", Json::Value::null);
Json::Value element_id = frame_id.get(JSON_ELEMENT_PROPERTY_NAME, Json::Value::null);

if (element_id.isNull()) {
status_code = ENOSUCHFRAME;
Expand Down
4 changes: 2 additions & 2 deletions cpp/iedriver/InputManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,8 @@ int InputManager::PointerMoveTo(BrowserHandle browser_wrapper, const Json::Value
Json::Value origin_value = move_to_action["origin"];
if (origin_value.isString()) {
origin = origin_value.asString();
} else if (origin_value.isObject() && origin_value.isMember("element-6066-11e4-a52e-4f735466cecf")) {
origin = origin_value["element-6066-11e4-a52e-4f735466cecf"].asString();
} else if (origin_value.isObject() && origin_value.isMember(JSON_ELEMENT_PROPERTY_NAME)) {
origin = origin_value[JSON_ELEMENT_PROPERTY_NAME].asString();
element_specified = true;
}
}
Expand Down

0 comments on commit f9d99f0

Please sign in to comment.