Skip to content

Commit 9e6b5f8

Browse files
committed
Fixing finding elements by XPath in IE9+ with document mode >= IE9
The previous code checked the browser version to ensure that XML namespaces were implemented for finding by XPath in IE 9 or higher. However, this would still fail in IE9 if the document mode was below the document mode for IE9. This commit changes the check to look at document mode rather than browser version.
1 parent a549e49 commit 9e6b5f8

File tree

6 files changed

+8249
-8233
lines changed

6 files changed

+8249
-8233
lines changed

cpp/iedriver/Generated/atoms.h

Lines changed: 8243 additions & 8232 deletions
Large diffs are not rendered by default.

cpp/iedriverserver/CHANGELOG

Lines changed: 5 additions & 0 deletions
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.44.0.3
13+
=========
14+
* Fixed finding elements by XPath for IE 9 where document mode is less than
15+
IE9.
16+
1217
v2.44.0.2
1318
=========
1419
* Updates to JavaScript automation atoms.
0 Bytes
Binary file not shown.
11 KB
Binary file not shown.
11 KB
Binary file not shown.

javascript/atoms/locators/xpath.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ bot.locators.xpath.evaluate_ = function(node, path, resultType) {
106106
return doc.evaluate.call(doc, path, node, resolver, resultType, null);
107107

108108
} else {
109-
if (!goog.userAgent.IE || goog.userAgent.isVersionOrHigher(9)) {
109+
if (!goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9)) {
110110
var reversedNamespaces = {};
111111
var allNodes = doc.getElementsByTagName("*");
112112
for (var i = 0; i < allNodes.length; ++i) {

0 commit comments

Comments
 (0)