Evening! I am trying to login to a site with zombie.js, but it seems like I cannot get it to work. Oh, and the site is in Finnish, but it's not very difficult to understand, two text fields and a button. First for the username, the second for the password and the button is the login button.
At the moment, my login code is as follows:
var Browser = require("zombie");
browser = new Browser();
browser.visit("https://www.nordnet.fi/mux/login/startFI.html?cmpi=start-loggain",
function () {
console.log(browser.text("title"));
browser.document.getElementById("input1").value ="MYUSERNAME";
browser.document.getElementById("pContent").value ="MYPASSWORD";
browser.document.getElementById("loginForm").submit();
setTimeout(function () {
console.log(browser.text("title"));
}, 2000);
});
Now I know that I might have had to use my own method of “filling in” zombies, but I tried it with no luck, so I tried something new.
All I get is an error:
Y:\IMC\Development\Web\node_modules\zombie\lib\zombie\forms.js:72
return history._submit(_this.getAttribute("action"), _this.getAttribute(
^
TypeError: Cannot call method '_submit' of undefined
Now, if I register this browser.document.getElementById("loginForm"), he clearly finds the form, but, alas, for some reason he does not like it.
"" , - . , , , , , <span>. , "click" .
, , , , . ä /344 :
throw new Error("No BUTTON '" + selector + "'");
^
Error: No BUTTON 'Kirjaudu sisään'
, , , .
, - , - , , .
, - , , YQL ? , 15 , , , .