According to the type of page, the Multistep login can defer. The JS should be separated on the MP if the pages have different steps, as for example, click on the button will open a new directory.
Case 1:
|
URL |
|
|---|---|
|
Step 1: |
document.querySelector("#login .login-identifier > form > button").click();
|
|
Step 2: |
MonsidoLogin.setInputValue(document.querySelector('#username'), '{{USERNAME}}');
document.querySelector('button[type=submit]').click();
|
|
Step 3: |
MonsidoLogin.setInputValue(document.querySelector('#password'), '{{PASSWORD}}');
document.querySelector('button[type=submit]').click();
|
Case 2:
|
URL |
|
|---|---|
|
Step 1: |
MonsidoLogin.setInputValue(document.querySelector("input[name=usernameCheck]"), "{USERNAME}");
document.querySelector("input[name=commit]").click();
|
|
Step 2: |
document.querySelector("#identifierNext > div > button").click();
setTimeout(function() {
MonsidoLogin.setInputValue(document.querySelector("input[name=password]"), "{PASSWORD}");
document.querySelector("#passwordNext > div > button").click();
}, 5000);
|
Case 3:
|
URL |
|
|
Step 1: |
document.querySelector(".header-main__links .lg-only .button").click();
|
|
Step 2: |
MonsidoLogin.setInputValue(document.querySelector("#UserName"), '{USERNAME}');
document.querySelector('button[type=submit]').click();
|
|
Step 3: |
MonsidoLogin.setInputValue(document.querySelector('#Password'), '{PASSWORD}');
document.querySelector('button[type=submit]').click();
|
Case 4:
|
URL |
|
|---|---|
|
Step 1: |
document.querySelector(".header .navbar .btn").click();
|
|
Step 2: |
MonsidoLogin.setInputValue(document.querySelector('input[id="username-input"]'), '{USERNAME}');
MonsidoLogin.setInputValue(document.querySelector('input[id="password-input"]'), '{PASSWORD}');
document.querySelector("#submit-button").click();
|
URL
https://monsidotest.neocities.org/
Steps:
Completes with timeout
window.MonsidoLogin.setInputValue(document.querySelector('#textfield-1011-inputEl'), 'monsidoScan');
setTimeout(function () {
document.querySelector('#button-1015-tooltipEl').click();
setTimeout(function () {
window.MonsidoLogin.setInputValue(document.querySelector("#textfield-1018-inputEl"), "H4V2PaJ/,oa-D595LHN,PeV$kqZ.~");
setTimeout(function () {
document.querySelector("#button-1022-tooltipEl").click();
}, 500);
}, 500);
}, 500);