This is most likely caused by the selector you are trying to type into not being present on the page. Focus gets called on it before the typing occurs, see this function (https://github.com/segmentio/nightmare/blob/master/lib/actions.js#L177
). For example you would get the same error by opening up your console in chrome and running
so the first thing I would do is double check the selector you are using compared with the DOM that is present when you are trying to type.