Skip to content

Commit

Permalink
Cleaning up variant copying in getAttribute for IE
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Oct 10, 2018
1 parent b46c7bd commit 65364c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cpp/iedriver/CommandHandlers/SendKeysCommandHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ bool SendKeysCommandHandler::HasMultipleAttribute(ElementHandle element_wrapper)
&multiple_value);
if (status_code == WD_SUCCESS &&
VariantUtilities::VariantIsString(multiple_value)) {
std::wstring value(multiple_value.bstrVal);
if (value == L"true") {
if (multiple_value.bstrVal == L"true") {
allows_multiple = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/iedriver/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ int Element::GetAttributeValue(const std::string& attribute_name,
status_code = script_wrapper.Execute();

if (status_code == WD_SUCCESS) {
*attribute_value = script_wrapper.result();
::VariantCopy(attribute_value, &script_wrapper.result());
} else {
LOG(WARN) << "Failed to determine element attribute";
}
Expand Down

0 comments on commit 65364c5

Please sign in to comment.