I can not change the text in textarea using WebClient/HtmlUnit/Java. I tried to google it, but with no luck. Can anyone help? There is source code:
WebDriver driver = new HtmlUnitDriver();
driver.get("http://some_site.com");
driver.findElement(By.id("niEditor")).sendKeys("some value");
String test = findElement(By.id("niEditor")).getText(); // no changes
and the tags in html:
<textarea class="tinyMCE newitem2" id="niEditor" name="description"> MANY TEXT </textarea>
The way I do it (and it works for me)
driver.findElement(By.id("niEditor")).clear();
driver.findElement(By.id("niEditor").sendKeys("data");
The first line of code actually shifts the focus to the text area which might be causing the issue for you. Try out this code and let us know if it works.