.clear() isn't really an alias for .type('{selectall}{backspace}') #8447
Labels
pkg/driver
This is due to an issue in the packages/driver directory
type: bug
type: unexpected behavior
User expected result, but got another
The
.clear()
command isn't an alias to.type('{selectall}{backspace}')
since it doesn't behave the same. Since cypress 3.5 it's possible to type in any DOM element and if a typeable element gains focus during.type()
then cypress continues in that one. So if you.get()
a parent element of a typeable one, then.clear()
should work because it's supposed to be an alias to.type('{selectall}{backspace}')
as stated in the docs.Current behavior:
.clear()
doesn't have the same behavior as.type('{selectall}{backspace}')
Desired behavior:
.clear()
to behave exactly like.type('{selectall}{backspace}')
Test code to reproduce
Versions
Tested on cypress 5.0 but most likely every version since 3.5
The text was updated successfully, but these errors were encountered: