I didn't include my correct email and password. However, entering the wrong email and password and then clicking the log in button will still make the modal disappear.
Expected Result
I will be told that entered the wrong email and password combination and modal shouldn't disappear.
What happens instead?
The modal disappears.
Code
const puppeteer = require('puppeteer');
(async () => {
// const browser = await puppeteer.launch();
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
await page.setViewport({
width: 1550,
height: 700,
deviceScaleFactor: 1,
});
await page.goto('https://splinterlands.com');
//click log in button to fill form
await page.$eval("#log_in_button button", (el)=>{
el.click()
});
//type username to username section
await page.$eval("input#email.form-control", (el)=>{
el.value = "@gmail.com"
});
//type password to password section
await page.$eval("input#password.form-control", (el)=>{
el.value = "b"
});
//click log in button to log in
await page.$eval(".form-horizontal button.btn.btn-primary.btn-lg", (el)=>{
el.click()
});
})();