segment-boneyard / nightmare

A high-level browser automation library.
https://open.segment.com
19.54k stars 1.08k forks source link

Simulate a return key in nightmare '.type('body', '\u000d')' #1611

Closed xcage7 closed 4 years ago

xcage7 commented 4 years ago

There is an input form without a submit button & the only way to submit is my pressing enter which is '.type('body', '\u000d')' in nightmare, but it doesn't work. what can i do??

aleks5d commented 4 years ago

you can type Enter in input form:

nightmare
    .goto(url)
    .type('#login', 'login')
    .type('#password', 'password')
    .type('#password', '\u000d');