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

List:       htmlunit-user
Subject:    Re: [Htmlunit-user] Progress bar for a large file submitted through
From:       Marc Guillemot <mguillemot () yahoo ! fr>
Date:       2009-09-23 5:05:08
Message-ID: 4AB9AC84.2020004 () yahoo ! fr
[Download RAW message or body]

Hi,

HtmlUnit doesn't provide any facility for that. I've looked a bit at 
HttpClient's sources and it seems possible if you manage to subclass 
InputStreamRequestEntity and override writeRequest... and gets your code 
used for post requests. For this you would need to subclass 
HttpWebConnection then to return your own HttpMethod for POST and to 
override generateRequestEntity to return your subclass of 
InputStreamRequestEntity

Note that we want to migrate to HttpClient 4.0 for the next HtmlUnit 
release and custom code written against Commons-HttpClient-3.1 API will 
probably not work anymore.

Cheers,
Marc.
-- 
Web: http://www.efficient-webtesting.com
Blog: http://mguillem.wordpress.com

jcjimen wrote:
> Hi all,
> 
> I'm developing a test application which uploads large files through a input
> type="file" in a form.
> 
> I would like to know if there is any way of knowing the status of the upload
> to create a progress bar or something else to show it graphically in the
> application.
> 
> The call to submit the form is of course a submit and the application will
> continue the next line execution when page gets the value, i.e. when the
> file is uploaded.
> 
> page = (HtmlPage) form.submit((HtmlSubmitInput)
> form.getInputByValue("Upload"));
> 
> Is there something implemented for this? It would be very useful to show a
> progress of the submit form (file upload). Any help?
> 
> Regards,
> John Charles 


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
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