Currently I'm using WebdriverJS and trying fill a form. My test is open form > fill the field with sendKeys and store this value for the variable. Follow my code:
driver.findElement(By.xpath("//a[contains(text(),'Añadir Propuesta Test')]")).click();
driver.wait(function () {
return driver.isElementPresent(By.css(".form-control.col-md-8"));
}, 15000);
var propuesta = driver.findElement(By.name('rut'));
propuesta.sendKeys('1111122222');
propuesta.getText().then(function(text){
console.log(text);
});
My actual result is returning empty value
How can I use sendKeys and store the same value sent?