From: David D.K. <ddk...@ki...> - 2005-01-04 14:59:15
|
I think form.submit() will submit the form *without* actually "clicking" the Login button. It may sound counter-intuitive, but some web applications (esp. Jakarta Struts) require the button value to be submitted so that they know what action the user took. (I realize the web site is using ASP[X], but it may work in a similar fashion.) Try to get an object for the Login button (using the form object or the page object), then call click() on the Login button object, the see if the page object returned is what you're expecting. Remember, you must think like the web browser, or in other words, WWMWBD: "What would my web browser do?" :) Dave On Jan 4, 2005, at 8:36 AM, Vitor George wrote: > I riped off those lines, and changed the method form.click() to > form.submit(), but I still get the login page (Login.aspx) back. > > > On Mon, 3 Jan 2005 21:15:59 -0600, David D. Kilzer > <ddk...@ki...> wrote: > >> Why don't you want the result of submitting the login form? Instead, >> you're throwing away the result of the login form and replacing it >> with >> a new web page: >> >> // fetch and print the initial page >> url = new URL("http://www.orkut.com/Home.aspx"); >> page = (HtmlPage) client.getPage(url); >> >> Try commenting out the above two lines of code and see if you get the >> results you want. >> >> Dave > |