I am trying to set some Text into the TextArea which has some kind of text to it by default which when clicked clears out and then you can set text to it, but I'm enable to perform it with webdriver using java.
Here's the code snippet of the TextArea:
<textarea id="gwt-uid-13" class="v-textarea v-widget v-textarea-required v-required v-has-width v-textarea-prompt" aria-labelledby="gwt-uid-12" aria-required="true" rows="5" tabindex="0" style="width: 600px;" maxlength="4000"/>
Here's what I have tried so far: element is the TextArea control itself:
element= driver.findElement(By.id("gwt-uid-13"))
element.clear();
element.sendKeys("Modification Comment TextArea");
Also, I tried first clicking the element too:
element.click(); element.clear(); element.sendKeys("Modification Comment TextArea");
Please check out the images attached for more info:
This is something that works for me (got to know this with trial and error) - instead of performing click() first, I tried sending TAB and clear and the value.
element.sendKeys(Keys.TAB);
element.clear();
element.sendKeys("Some Sample Text Here");
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With