Set value of input instead of sendKeys() - Selenium WebDriver nodejs
Try to set the element's value using the executeScript
method of JavascriptExecutor:
WebDriver driver = new FirefoxDriver();
JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript("document.getElementById('elementID').setAttribute('value', 'new value for element')");
Extending from the correct answer of Andrey-Egorov using .executeScript()
to conclude my own question example:
inputField = driver.findElement(webdriver.By.id('gbqfq'));
driver.executeScript("arguments[0].setAttribute('value', '" + longstring +"')", inputField);