jQuery: clear input field

Last updated on:

Well, there is few times I had a problem to clear data straight forward using Selenium Java API call, so sometimes I was providing extra data:

Server didn't like it that much and was throwing an error, I end up with simple JQuery implementation:

public static void clearInputJS(String cssSelector){

        js.executeScript("$('" + cssSelector + "').val('');");
View Comments

Leave a Comment

Use markdown or basic HTML and be nice.