Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to clear input field value when typing falsy value #1252

Closed
davidkwan95 opened this issue Sep 6, 2017 · 2 comments
Closed

unable to clear input field value when typing falsy value #1252

davidkwan95 opened this issue Sep 6, 2017 · 2 comments

Comments

@davidkwan95
Copy link

This is similar to the issue at #810

I am unable to clear the input field when putting an empty string or falsy value inside the type or insert method, although the documentation says

.type(selector[, text])  
Enters the text provided into the selector element.
Empty or falsey values provided for text will clear the selector's value.
@TimNZ
Copy link

TimNZ commented Sep 7, 2017

This works:

nightmare
    .goto('http://google.com')
    .type('[name=q]','hi')
    .wait(1000)
    .type('[name=q]','')
    .wait(1000)
    .end()
    .then((result) => {
      console.log(result);
    })

@davidkwan95
Copy link
Author

okay, seems like it's a problem with the site I'm trying to automate. it works fine with other sites

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants