I am currently trying to automate web page contains few js and jQuery implementations using selenium WebDriver. I have noticed few posts says about implementing the code to wait for page load completely.
ExpectedCondition<Boolean> jQueryLoad = new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver driver) {
try {
return ((Long) executeJavaScript("return jQuery.active") == 0);
} catch (Exception e) {
return true;
}
}
};
But I am unable to solve'undefined type error' thrown by the use of 'executeJavaScript'. Can someone guide me which library I am missing? or How to work with this code.