vendredi 15 décembre 2017

Selenium java - jquery not supported

When I click on a button it's supposed to execute a javascript funciton but I get this exception .

net.sourceforge.htmlunit.corejs.javascript.EcmaError: ReferenceError: "$" is not defined.

This is the function:

function selectAll(){
    $(".role option").attr("selected","selected");
}

I am using selenium-java-2.49.1 and htmlunit for my test.

My question is how do I get selenium to recognize jquery?

Aucun commentaire:

Enregistrer un commentaire