Description
Current behavior
When a user types into an input field, Studio will record the characters pressed and add them to a new cy.type()
command. However, we run into a problem when there is already a value in that field before the typing begins. If the user's cursor is not at the end of the line, or they highlight some characters and delete, etc. Studio will still generate a type command with the characters typed. This causes those typed characters to be appended to the end of the input when run, which does not accurately reflect the user's actions. See an example below
Desired behavior
Studio should attempt to mimic the user's actions as closely as possible. We'll have to compare the actual values within the input element to guess at what action the user is taking and do our best to accurately replicate that in the generated Studio commands. This might require us to add cy.clear()
before the cy.type()
command or something along those lines.
Versions
Cypress 6.3.0