i'm trying to automate a login and logout script using javascript, but whenever it logs in, the console code clears up. is there a way to make it run thesame script after login? so that it will be able to logout automatically?
this script logs in but after login, it clears the console so it doesn't see the logout code:
var login= document.querySelector("button[type='submit']"); login.click();
var logout = document.querySelector("a[href='https://example.com/logout.php']"); logout.click();