Skip to content

Commit

Permalink
Truncating obscured element description to first angle bracket
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Aug 8, 2018
1 parent df47c85 commit 663edd4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpp/iedriver/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ bool Element::IsObscured(LocationInfo* click_location,
CComBSTR outer_html_bstr;
hr = element_in_list->get_outerHTML(&outer_html_bstr);
std::wstring outer_html = outer_html_bstr;
size_t bracket_pos = outer_html.find(L'>');
if (bracket_pos != std::wstring::npos) {
outer_html = outer_html.substr(0, bracket_pos + 1);
}
*obscuring_element_description = StringUtilities::ToString(outer_html);
break;
}
Expand Down

0 comments on commit 663edd4

Please sign in to comment.