First let me point out that I am very new to programming, so if I am missing something obvious, I'm sorry.
I am trying to write a program that allows you to enter this site,
but I find it difficult to understand how to enter my own lines in the email and password fields. I'm also not quite sure how to check if the login passed or not ...
This is my code:
public static void main(String[] args) throws Exception {
String loginURL = "https://www.skanetrafiken.se/inloggning?ReturnUrl=%2fmitt-konto%2fse-saldo-och-ladda-kort%2f";
String accountURL = "https://www.skanetrafiken.se/mitt-konto/se-saldo-och-ladda-kort/";
Document res = Jsoup
.connect(loginURL)
.data("loginInputModel.Email", "myEmail@email.com")
.data("loginInputModel.Password", "myPassword")
.post();
System.out.println(res);
}
This seems like a lot of examples I've seen, but it doesn't seem to work ...
source
share