diff --git a/cpp/iedriver/CommandHandlers/SwitchToFrameCommandHandler.cpp b/cpp/iedriver/CommandHandlers/SwitchToFrameCommandHandler.cpp index decbd0d0c7eff..da4cfa099d994 100644 --- a/cpp/iedriver/CommandHandlers/SwitchToFrameCommandHandler.cpp +++ b/cpp/iedriver/CommandHandlers/SwitchToFrameCommandHandler.cpp @@ -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; diff --git a/cpp/iedriver/InputManager.cpp b/cpp/iedriver/InputManager.cpp index b1d7f36b4fd76..ee7b58b7a0bf7 100644 --- a/cpp/iedriver/InputManager.cpp +++ b/cpp/iedriver/InputManager.cpp @@ -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; } }