0

I have very recently started using HTMLUnit. My goal is to automate logging into another website (I am using this as my guide). However, my code is unable to find the form (of the website I am trying to log into) by ID, even though I gave it the forms id.

Website Form HTML Code:

<form id="site-login-form" action="/podium/blank.html">

My code:

        final HtmlForm form = (HtmlForm) page1.getElementById("site-login-form");
                System.out.println("Found form");
                System.out.println(form);

When I try to print the form data (as seen above), null is printed instead.

I would really appreciate your help, thanks.

Community
  • 1
  • 1

0 Answers0