0

Hey Im trying to use HtmlUnit to login a page. Login form is different from login button form. I got the login form working but the form the login button is in is

something like this

<form method="POST" id="login-form" class="adjacent"   
action="/accounts/login/?    force_classic_login">

How would I go about getting the form for this since it doesnt have a name. How would I go about doing this

final HtmlForm form2 = 
0x2B
  • 91
  • 9

1 Answers1

1

How about

HtmlForm Form = htmlPage.getHtmlElementById("login-form");
Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
  • thanks :3 was looking for something like that. new problem but ill try fixing it before I ask for help :P again, thank you – 0x2B May 15 '15 at 21:48