Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 401133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:00:22+00:00 2026-05-12T17:00:22+00:00

I want to login to a website ( http://www.orkut.com ) through com.gargoylesoftware.htmlunit.WebClient But when

  • 0

I want to login to a website (http://www.orkut.com) through

com.gargoylesoftware.htmlunit.WebClient

But when I click on the “Submit” button, it doesn’t take me to the expected page that should come after login. Instead it returns the same login page again. In clear sense, there is some problem in login. When I try the same code with sites that doen’t have javascript, it works fine so I think I am not able to handle scripts.

I am trying using the follwoing code:

public static void main(String[] args) {
    final WebClient webClient = new WebClient();
    try {
        HtmlPage loginPage = webClient.getPage(new URL("https://www.google.com/accounts/ServiceLogin?service=orkut&hl=en-US&rm=false&continue=http%3A%2F%2Fwww.orkut.com%2FRedirLogin%3Fmsg%3D0%26page%3Dhttp%253A%252F%252Fwww.orkut.co.in%252FHome.aspx&cd=IN&passive=true&skipvpage=true&sendvemail=false"));
        System.out.println(loginPage.getTextContent());
        List<HtmlForm> forms = loginPage.getForms();
        HtmlForm loginForm = forms.get(0);
        HtmlInput username = loginForm.getInputByName("Email");
        HtmlInput password = loginForm.getInputByName("Passwd");
        HtmlInput submit = loginForm.getInputByName("signIn");
        username.setNodeValue("username");
        password.setNodeValue("password");
        HtmlPage homePage = submit.click();
        Thread.sleep(10 * 1000);
        System.out.println(homePage.getTextContent());
    }catch(Exception ex) {
        ex.printStackTrace();
    }
}

When we do click on the “submit” button, in actual it calls first this function

onsubmit="return(gaia_onLoginSubmit());"

specified as the attribute of the form below

<form id="gaia_loginform" action="https://www.google.com/accounts/ServiceLoginAuth?service=orkut" method="post"
    onsubmit="return(gaia_onLoginSubmit());">

Can anyone help me in this.

NOTE: I WILL PAY FOR THE SOLUTION

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:00:22+00:00Added an answer on May 12, 2026 at 5:00 pm

    According to their site the JavaScript support is provided by Mozilla Rhino, so maybe all you need is to add it to your classpath (and perhaps fiddle with some configurations).

    Also, HtmlUnit has professional support

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to read a website in C# using this: WebRequest myWebRequest = WebRequest.Create(http://www.myurl.com/test.aspx);
Here is the website I want to try out. http://www.csun.edu/ Under myNorthRidge Portal, there
i have used the login script which is found here http://www.phpeasystep.com/phptu/6.html the script works
I want to use the following code to login to a website which returns
I have an php website with login form and I want every visitors can
i want users can log in my website throw FB connect ON MOBILE but
I want in my wordpress website that user can log in through their facebook
I want to support login with an MSN account but MSN doesn't support OpenID.
I want to implemewnt URL-Rewriting in way that user can access website with username.domain.com
I want to login to website https://ssl.aukro.ua/enter_login.php with following credential parsing and stackoverflow1 I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.