jwebdriver_xpath

UI Recorder jWebDriver 不支持括号开头的XPath, 如

1
(//input)[2]

原因在于jWebDriver错误的认为括号开头的是css selector

修改lib/elements.js

1
2
// using = /^\.?\//.test(value)?'xpath':'css selector';
using = /^(\.|\()?\//.test(value)?'xpath':'css selector';