Selenium Java - JavaScriptExecutor
You want to set the attribute
placeholder of an input element to "Enter name" using Selenium Java. Which code snippet fixes the error below?// Current code
WebElement input = driver.findElement(By.id("name"));
input.setAttribute("placeholder", "Enter name"); // Error: cannot find symbol