Skip to content

Commit e22b53a

Browse files
committed
Reset browser window handle on failure to attach via Active Accessibility
When launching a new instance, if the driver attempts to use Active Accessibility to attach to the instance, and the attach fails, the driver should attempt to attach using the ShellWindows API. However, this fallback is skipped if the window has already been found. Resetting the found window handle to NULL allows the driver to proceed with the second attempt to attach.
1 parent 9672ff8 commit e22b53a

File tree

6 files changed

+7319
-7300
lines changed

6 files changed

+7319
-7300
lines changed

cpp/iedriver/BrowserFactory.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ bool BrowserFactory::AttachToBrowser(ProcessWindowInfo* process_window_info,
312312
if (!attached) {
313313
LOG(DEBUG) << "Failed to find IWebBrowser2 using ActiveAccessibility: "
314314
<< *error_message;
315+
// Reset the browser window handle to NULL, since we didn't attach
316+
// using Active Accessibility.
317+
process_window_info->hwndBrowser = NULL;
315318
}
316319
}
317320

cpp/iedriver/Generated/atoms.h

+7,304-7,299
Large diffs are not rendered by default.

cpp/iedriverserver/CHANGELOG

+12-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,18 @@ 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.45.0.1
12+
v2.45.0.3
13+
=========
14+
* Updates to JavaScript automation atoms.
15+
* Corrected wrong value for pageLoadStrategy capability.
16+
* Reset browser window handle on failure to attach via Active Accessibility.
17+
When launching a new instance, if the driver attempts to use Active
18+
Accessibility to attach to the instance, and the attach fails, the driver
19+
should attempt to attach using the ShellWindows API. However, this fallback
20+
is skipped if the window has already been found. Resetting the found window
21+
handle to NULL allows the driver to proceed with the second attempt.
22+
23+
v2.45.0.2
1324
=========
1425
* Updates to JavaScript automation atoms.
1526
* Added pageLoadStrategy to IE driver. Setting a capability named

cpp/iedriverserver/IEDriverServer.rc

0 Bytes
Binary file not shown.
18 KB
Binary file not shown.
18.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)