Commit be524b6
committed
Adding Protected Mode boundary closing mechanism in IE
When a Protected Mode boundary is crossed (entering or exiting Protected
Mode), the existing browser instance is destroyed and a new one created in
its place by Interent Explorer. This commit adds detection for when a
browser instance is being closed, but without an explicit call to the
WebDriver close() or quit() methods. When this is detected, it's likely a
Protected Mode boundary is being crossed, and all subsequent commands in
the WebDriver session will fail. In this case, the driver will now write
to the log that the browser has been asked to exit without the user
explicitly requesting it. The detection is not perfect, since it's
possible to legitimately click a link that closes the browser window, and
this is indistinguishable from clicking a link that navigates to a URL
that causes a Protected Mode boundary crossing. Nevertheless, this logging
is being added so that users can see what may be happening when they
receive errors like "Unable to get current browser."1 parent 9517a40 commit be524b6
2 files changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
55 | 67 | | |
56 | 68 | | |
57 | 69 | | |
| |||
304 | 316 | | |
305 | 317 | | |
306 | 318 | | |
| 319 | + | |
307 | 320 | | |
308 | 321 | | |
309 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
130 | 133 | | |
131 | 134 | | |
132 | 135 | | |
| 136 | + | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| |||
0 commit comments