Currently I have a form with 10 fields that I need to do sendkeys > store the value and after assert this value when save the form. For each of these fields I need to create a function and store the value in a variable or is there a better way?
My actual code:
var email = driver.findElement(By.name('email'));
email.sendKeys('info@domain.com');
email.getAttribute("value").then(function(email_text) {
var email = email_text;
});
Cheers, Rafael