mardi 3 juillet 2018

Automated browser does not submit form

I'm currently making automated tests for Browserstack using Selenium and Nightwatch.js. I've encountered a problem where I'm unable to submit a login form. Either nothing happens or the page just reloads. All required login data are set using browser.setValue('#some-input'). Tried this on Chrome and Firefox, but the result is the same.

I've tried the following methods to no avail.

browser.submitForm('#login-form');
browser.click('#send');
browser.execute("document.getElementById('send').click();");
browser.execute("document.getElementById('login-form').submit();");

Is there anything that I'm missing? If that makes a difference, I'm trying to automate a login form for Magento 1 site.

Much thanks.

Aucun commentaire:

Enregistrer un commentaire