I have a long string to test and sendKeys() takes too long. When I tried to set the value of the text the program crashes. I know the Selenium
sendKeys()
text
In a nutshell, this is the code which works for me :)
WebDriver driver; WebElement element; String value; JavascriptExecutor jse = (JavascriptExecutor)driver; jse.executeScript("arguments[0].value='"+ value +"';", element);