avi
avi

Reputation: 1877

How to disable HTML 5 client side form validation for Java

I'm trying to use the following code to disable form validation using JavaScript which isn't working:

     ((JavascriptExecutor) webDriver).executeScript("document.getElementById('node-event-form').noValidate = true;");

Whereas the command document.getElementById('node-event-form').noValidate = true; works in the console. I've verified this on Chrome and Firefox latest versions.

Does anybody know what I could be doing wrong?

Upvotes: 0

Views: 397

Answers (0)

Related Questions