[SOLVED] How to efficiently send large String to java selenium textarea element


I need to send Large text in the type of String to textArea element. I use


But Its too slow. Any ideas to make this fast?


You can try it with JS executor:

  public void enterTextJS(By locator, String text) {
    JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;
    WebElement element = driver.findElement(locator);
    jsExecutor.executeScript("arguments[0].value='" + text + "';", element);

Answered By – Villa_7

Answer Checked By – Mary Flores (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *