browser.getEval function in selenium makes iterateNext return null ..Otherwise in firebug it returns a value(same script)
document.evaluate("//button[text()='Save']",
document,
null,
XPathResult.ANY_TYPE,
null)
.iterateNext()
.disabled;
returns true
But
browser.getEval("document.evaluate(\"//button[text()='Save']\",
document,
null,
XPathResult.ANY_TYPE,
null)
.iterateNext()
.disabled;");
returns that error as :
"com.thoughtworks.selenium.SeleniumException: ERROR: Threw an exception: res.iterateNext() is null "