Updating field in React Applications


#1

In some React applications fillField does not clear the field and value gets appended.
This is how you can overcome this issue and update fields in React.

Add to steps_file.js:

    updateField(fieldName, value) {
      this.appendField(fieldName, '');
      this.pressKey(['Shift', 'Home']);
      this.pressKey(value);
    }

With append field we select the field, by pressing Shift-Home we select the whole text (can be different on Mac), and then we replace that with the new input.