How can I set value in a text field with JS-Cucumber?
Hello Alex,
You can set values in text filed by adding sendKeys
command with JS-Cucumber. Please refer to the sample below:
this.When(/^select the textbox add "([^"]*)" in the box$/, function (text, next) {
this.driver.findElement({ id: 'sampletodotext' }).click();
this.driver.findElement({ id: 'sampletodotext' }).sendKeys(text).then(next);
});