I do a query c nodejs nightmare on a certain site. You must enter alphanumeric characters in the num field. If you use Latin characters, they are inserted, Cyrillic - no. Saving the file to utf-8 and inserting the header 'content=text/html; charset=utf-8' parameter in ' .goto header 'content=text/html; charset=utf-8' header 'content=text/html; charset=utf-8' did not help.
Also with the result. On a real site, msg returns text in Cyrillic, via the null script.
Actually code:
var iconv = require('iconv-lite'); var Nightmare = require('nightmare'); var nightmare = Nightmare({ show: true }) nightmare .goto('http://ssssite.ru//', 'content=text/html; charset=utf-8') .wait() .type('input[id="num"]', '') .type('input[id="num"]', '123ффффф123123236269') .wait(5000) .click('#buttsearchsts') .wait() .wait(5000) .evaluate(function() { var a = document.getElementsByTagName('msg'); }) .end() .then(function(result) { console.log('11'); console.log(result); console.log('22'); }) .catch(function(error) { console.error('Search failed:', error); });