登录以与浏览器控制台不一致

wljmcqd8  于 2022-09-21  发布在  jQuery
关注(0)|答案(1)|浏览(154)

如何使用浏览器控制台登录到https://discord.com/login

我可以使用这些查询设置输入字段上的值。

document.querySelector('input[name="email"]').value = 'test@gmail.com';
document.querySelector('input[name="password"]').value = 'test123';

并单击带有以下查询的登录按钮

document.querySelectorAll("button[type='submit']")[0].click();

但随后它只会清除这两个字段,并表示密码是必填字段。

如有任何帮助,我们不胜感激。

谢谢安德斯

gwo2fgha

gwo2fgha1#

let element = document.getElementsByName('email');
                      element[0].focus();
                      document.execCommand('insertText', false, '##YOUR_EMAIL##');
                      element = document.getElementsByName('password');
                      element[0].focus();
                      document.execCommand('insertText', false, '##YOUR_PASSWORD##');
                      document.getElementsByClassName('marginBottom8-emkd0_ button-1cRKG6 button-f2h6uQ lookFilled-yCfaCM colorBrand-I6CyqQ sizeLarge-3mScP9 fullWidth-fJIsjq grow-2sR_-F')[0].click();

相关问题