diff options
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) {  | 
