Skip to content

Commit bb5ca71

Browse files
committedJun 11, 2015
Handling alert text controls conatining no accText property in IE.
Fixes issue #651.
1 parent 464ab8e commit bb5ca71

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed
 

Diff for: ‎cpp/iedriver/Alert.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,16 @@ std::string Alert::GetDirectUIDialogText() {
208208
if (FAILED(hr)) {
209209
LOGHR(WARN, hr) << "Failed to get accName property from text object";
210210
return alert_text_value;
211+
} else if (hr != S_OK) {
212+
// N.B., get_accName can return an error value without it being a
213+
// standard COM error.
214+
LOG(WARN) << "Getting accName property from text object returned an error "
215+
<< "(value: " << hr << "). The text object may not have a name.";
216+
return alert_text_value;
217+
} else if (text_bstr == NULL) {
218+
LOG(WARN) << "Getting accName property from text object returned a null "
219+
<< "value";
220+
return alert_text_value;
211221
}
212222

213223
std::wstring text = text_bstr;

Diff for: ‎cpp/iedriverserver/CHANGELOG

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ available via the project downloads page. Changes in "revision" field indicate
99
private releases checked into the prebuilts directory of the source tree, but
1010
not made generally available on the downloads page.
1111

12+
v2.46.0.0
13+
=========
14+
* Handles issue with alert text controls conatining no accText property in IE.
15+
Fixes issue #651.
16+
1217
v2.46.0.0
1318
=========
1419
* Release to synchronize with release of Selenium project.

Diff for: ‎cpp/iedriverserver/IEDriverServer.rc

0 Bytes
Binary file not shown.

Diff for: ‎cpp/prebuilt/Win32/Release/IEDriverServer.exe

1 KB
Binary file not shown.

Diff for: ‎cpp/prebuilt/x64/Release/IEDriverServer.exe

1.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)
Please sign in to comment.