How to set value in a text field with JS-Protractor?

How can I set value in a text field with JS-Protractor?

Hello Alex,

You can set values in text filed by adding sendKeys command with JS-Protractor. Please refer to the sample below:

   browser.driver.findElement(by.id('sampletodotext')).then(function (foundElement) {
            foundElement.clear();
            foundElement.sendKeys("Yey, Let's add it to list");
            });