I have got a problem with obtaining some href's by Selenium Webdriver. Therefore I have used JQuery script to make it.
script =
"(function() {
var a = [];
$("a.class0.class1.link").each(function() {
a.push($(this).attr('href'));
});
return a;
})()";
executed by such code:
result = javascriptExecutor.executeScript(script)
But result has null value. When I run that script in Chrome console I have got correct result - array of href's. What I did wrongly?