Dear All,
I have not used b4j for the last 3 years (nor any other programming language) so my apologies if my question seems a bit stupid. I did try to find answers on the forum, but did not succeed.
This is my situation: I want to login on a website with login and password fields + a "Sign in" button and do various stuff after that.
At first I thought it´d be a piece of cake to do it all with httpjob, so I loaded Fiddler to have a look at the packets going back and forth. Unfortunately there are some hash strings that need to be sent to the server, which I guess are created on the client side using code received from the server, so it´s a bit more complicated than I thought at first.
So what I´m thinking about is using a browser library where the authentication is done by automatically filling in the authentication fields and clicking on the Sign in button and then hopefully at that point I´ll have been able to grab all necessary hashes and tokens in an event that captures the responses, and can proceed with httpjob.
The parts of the website with the authentication fields and the button looks like this:
I remember having done something like this many years ago, but I think it was in vb6, where I believe that the key to being successful was using the tabindex values.
I hope somebody can help me here, thanks in advance!
I have not used b4j for the last 3 years (nor any other programming language) so my apologies if my question seems a bit stupid. I did try to find answers on the forum, but did not succeed.
This is my situation: I want to login on a website with login and password fields + a "Sign in" button and do various stuff after that.
At first I thought it´d be a piece of cake to do it all with httpjob, so I loaded Fiddler to have a look at the packets going back and forth. Unfortunately there are some hash strings that need to be sent to the server, which I guess are created on the client side using code received from the server, so it´s a bit more complicated than I thought at first.
So what I´m thinking about is using a browser library where the authentication is done by automatically filling in the authentication fields and clicking on the Sign in button and then hopefully at that point I´ll have been able to grab all necessary hashes and tokens in an event that captures the responses, and can proceed with httpjob.
The parts of the website with the authentication fields and the button looks like this:
B4X:
<div class="form-group username">
<label class="control-label" for="Email">Email</label>
<input class="form-control" placeholder="Email Address" autocomplete="off" tabindex="1" spellcheck="false" type="text" data-val="true" data-val-required="The Email field is required." id="Email" name="Email" value="" />
<span class="text-danger" id="unError" style="display:none;">Please enter a valid email address</span>
</div>
<div class="form-group password">
<label class="control-label" for="Password">Password</label>
<input type="password" class="form-control" placeholder="Password" autofocus="autofocus" autocomplete="off" tabindex="2" id="Password" name="Password" />
</div>
<div class="form-group">
<button type="submit" id="SubmitLogin" tabindex="3">
Sign in
</button>
</div>
I remember having done something like this many years ago, but I think it was in vb6, where I believe that the key to being successful was using the tabindex values.
I hope somebody can help me here, thanks in advance!