I am using the below code to highlight the input box in a web page:
JavascriptExecutor js=(JavascriptExecutor)driver;
WebElement username= driver.findElement(By.id("email"));
js.executeScript("arguments[0].setAttribute('style','border: solid 2px
red');", username);
It is giving me an error like this:
org.openqa.selenium.WebdriverException: unknown error:
arguments[0].setAttribute is not a function
Note: The tag in the web page already has a style attribute in it.
JavascriptExecutorand notJavafunctions?