I am using selenium and i need to write to and xpath element so far i managed to successfully make a click on it by using this
driver.findElement(
By.xpath("(.//*[normalize-space(text()) and normalize-space(.)='Vehicle:'])[1]/following::ul[1]"))
.click();
Then i need to write on it, i've been using this
WebElement ele = driver.findElement(By.xpath("(.//*[normalize space(text()) and normalize-space(.)='Vehicle:'])[1]/following::ul[1]"));
((JavascriptExecutor) driver).executeScript("arguments[0].value='SED'",ele);
In the example i tried to write SED
but i can't it to enter any text