diff options
author | wei <> | 2006-05-31 04:26:21 +0000 |
---|---|---|
committer | wei <> | 2006-05-31 04:26:21 +0000 |
commit | 3ac04dd9cbb3c14fb2522793b2268b910837d8c4 (patch) | |
tree | 1300309ca4ac08378a51adf4112dfec2db0f15eb /tests/FunctionalTests/selenium/selenium-browserbot.js | |
parent | 652bffab24bab354d9e3022b22866640f4fd4a0e (diff) |
Update selenium javascript, now runs in Safari!
Diffstat (limited to 'tests/FunctionalTests/selenium/selenium-browserbot.js')
-rw-r--r-- | tests/FunctionalTests/selenium/selenium-browserbot.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/FunctionalTests/selenium/selenium-browserbot.js b/tests/FunctionalTests/selenium/selenium-browserbot.js index bf605f01..f2003687 100644 --- a/tests/FunctionalTests/selenium/selenium-browserbot.js +++ b/tests/FunctionalTests/selenium/selenium-browserbot.js @@ -636,13 +636,18 @@ PageBot.prototype.findElementUsingFullXPath = function(xpath, inDocument) { addXPathSupport(inDocument); } + alert("find by xpath"); + // Use document.evaluate() if it's available if (inDocument.evaluate) { return inDocument.evaluate(xpath, inDocument, null, 0, null).iterateNext(); } + + // If not, fall back to slower JavaScript implementation var context = new XPathContext(); + context.expressionContextNode = inDocument; var xpathResult = new XPathParser().parse(xpath).evaluate(context); if (xpathResult && xpathResult.toArray) { |