You can emulate form submit through javascript from a background page. First you need to carefully inspect what data is sent through the login form and to which URL (form could be altered with javascript before sending so you need to know what actually is sent, not just what's in <form>
element). You can use Chrome's console for simple stuff, if it is not enough then there is Tamper Data plugin for Firefox, and for hardcore traffic inspection you can use Wireshark analyzer.
Then in a background page (I am using jQuery here):
$.ajax({
url: "https://login_form.html",
type: "GET",
dataType: "html",
success: function() {
$.ajax({
url: "https://login_form_submits_to.html",
type: "POST",
data: {
"username": "username",
"password": "password",
"extra_field": "value"
},
dataType: "html",
success: function(data) {
//now you can parse your report screen
}
});
}
});
Good thing is that Chrome persists session and cookies, so it is like logging in manually (if you now open your site in the browser you should be logged in).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…