Skip to content

Commit

Permalink
Fixing warnings in IE driver for 64-bit compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Nov 2, 2017
1 parent 7a74dbf commit 2e63ee6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void ExecuteAsyncScriptCommandHandler::ExecuteInternal(

Json::Value json_args = args_parameter_iterator->second;

int timeout_value = executor.async_script_timeout();
unsigned long long timeout_value = executor.async_script_timeout();
std::wstring timeout = std::to_wstring(static_cast<long long>(timeout_value));

std::wstring script_body = StringUtilities::ToWString(script_parameter_iterator->second.asString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void FindChildElementCommandHandler::ExecuteInternal(
if (status_code == WD_SUCCESS) {
Json::Value found_element;

int timeout = executor.implicit_wait_timeout();
int timeout = static_cast<int>(executor.implicit_wait_timeout());
clock_t end = clock() + (timeout / 1000 * CLOCKS_PER_SEC);
if (timeout > 0 && timeout < 1000) {
end += 1 * CLOCKS_PER_SEC;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void FindChildElementsCommandHandler::ExecuteInternal(
if (status_code == WD_SUCCESS) {
Json::Value found_elements(Json::arrayValue);

int timeout = executor.implicit_wait_timeout();
int timeout = static_cast<int>(executor.implicit_wait_timeout());
clock_t end = clock() + (timeout / 1000 * CLOCKS_PER_SEC);
if (timeout > 0 && timeout < 1000) {
end += 1 * CLOCKS_PER_SEC;
Expand Down
2 changes: 1 addition & 1 deletion cpp/iedriver/CommandHandlers/FindElementCommandHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void FindElementCommandHandler::ExecuteInternal(
return;
}

int timeout = executor.implicit_wait_timeout();
int timeout = static_cast<int>(executor.implicit_wait_timeout());
clock_t end = clock() + (timeout / 1000 * CLOCKS_PER_SEC);
if (timeout > 0 && timeout < 1000) {
end += 1 * CLOCKS_PER_SEC;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void FindElementsCommandHandler::ExecuteInternal(
return;
}

int timeout = executor.implicit_wait_timeout();
int timeout = static_cast<int>(executor.implicit_wait_timeout());
clock_t end = clock() + (timeout / 1000 * CLOCKS_PER_SEC);
if (timeout > 0 && timeout < 1000) {
end += 1 * CLOCKS_PER_SEC;
Expand Down
7 changes: 3 additions & 4 deletions cpp/iedriver/CommandHandlers/NewSessionCommandHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,15 +783,15 @@ bool NewSessionCommandHandler::ValidateCapabilities(
}
std::string proxy_type = proxy[proxy_setting].asString();
if (proxy_type != "pac" &&
proxy_type != "noproxy" &&
proxy_type != "direct" &&
proxy_type != "autodetect" &&
proxy_type != "system" &&
proxy_type != "manual") {
*error_message = "Invalid capabilities in " +
capability_set_name + ": " +
"a proxy type named " + proxy_type +
" is specified, but proxy type must be " +
"'pac', 'noproxy', 'autodetect', 'system', " +
"'pac', 'direct', 'autodetect', 'system', " +
"or 'manual'";
return false;
}
Expand All @@ -815,8 +815,7 @@ bool NewSessionCommandHandler::ValidateCapabilities(
continue;
}

if (proxy_setting == "noProxy")
{
if (proxy_setting == "noProxy") {
if (!this->ValidateCapabilityType(proxy,
proxy_setting,
Json::ValueType::arrayValue,
Expand Down

0 comments on commit 2e63ee6

Please sign in to comment.