[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-user
Subject:    [Htmlunit-user] Can't click a form button
From:       Roger Studner <rstudner () gmail ! com>
Date:       2009-08-20 15:41:19
Message-ID: d3b998ea0908200841h74c0442cm550937a0a5ffe607 () mail ! gmail ! com
[Download RAW message or body]

I have a form, with the following button (this is just a printout of
the HtmlSubmitInput):
<input type="submit" id="btSearch" name="btSearch" value="SEARCH"
class="MenuButton" onclick="return startSearch()"/>

The code is something like this:
    HtmlForm form = page.getHtmlElementById("frmMain");
    HtmlSubmitInput searchButton = form.getInputByName("btSearch");
    HtmlPage resultsPage = searchButton.click();
    System.out.println(resultsPage.getTextContent());

The "resultsPage" is always null.

This is a REALLY low-tech site.. no chance they have some super/magic
htmlunit blocker hah.

But for some reason, I can never ever get it to run.

Actual website URL is this:
http://icare.fairfaxcounty.gov/Search/GenericSearch.aspx?mode=ADDRESS

Any help would be appreciated... i've been successfully using HtmlUnit
for ages and can't figure out why this incredibly trivial one isn't
working

Thanks,
Roger

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Htmlunit-user mailing list
Htmlunit-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic