Here is code i am using to submit a form:
Connection.Response res = Jsoup.connect("http://example.com")
.data("id", "myID")
.data("username", "myUsername")
.data("code", "MyAuthcode") // get the value of Auth code from page element
.method(Method.POST).execute();
To submit the given form successfully, the field with [name="code"] needs to have a value set.
The value can be found on the page in another element. How on earth do I get the value of an element using the same connection, before actually submitting the form as shown above?
I need to use a value from an element, to fill out the form successfully..