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

List:       htmlunit-user
Subject:    Re: [Htmlunit-user] List of files downloaded
From:       "Sander A. Smith" <smithsa () sericontech ! com>
Date:       2009-12-16 11:55:38
Message-ID: 387455530912160355n368db779t4113b8409ca6db6e () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Ahmed,

I spent many hours trying to figure this one out. Your solution works great.
Thanks a lot.

Sander

On Tue, Dec 15, 2009 at 11:09 PM, Ahmed Ashour <asashour@yahoo.com> wrote:

>   Hi Sander,
>
> You can subclass HttpWebConnection, and override getResponse() method,
> something like:
>
>         webClient.setWebConnection(new HttpWebConnection(webClient) {
>             @Override
>             public WebResponse getResponse(WebRequestSettings settings)
>             throws IOException {
>                 System.out.println(settings.getUrl());
>                 return super.getResponse(settings);
>             }
>         });
> Yours,
> Ahmed
> ----
> Blog: http://asashour.blogspot.com
> ------------------------------
> *From:* Sander A. Smith <smithsa@sericontech.com>
> *To:* htmlunit-user@lists.sourceforge.net
> *Sent:* Wed, December 16, 2009 6:00:26 AM
> *Subject:* [Htmlunit-user] List of files downloaded
>
>    I'm trying to create a list of the files (and their URLs) that are
> downloaded in response to an action to load a page. I can see how to get the
> JavaScript files by registering a ScriptPreProcessor, but what do I do about
> the JPGs, CSSs, etc.? How can I be notified when they load?
>
> Sander
>
> --
> Sander A. Smith
> President
>
> Sericon Technology Inc.
> 71 Marquette Ave.
> Toronto, Ontario M6A 1X8
> (416)781-3988
>
> Link to me on LinkedIn
> http://www.linkedin.com/in/sandersmith
>
> Join our community of people interested in testing Facebook applications
> http://www.TestFacebook.com <http://www.testfacebook.com/>
>
> Learn about advanced tools for testing social networking applications
> http://www.FriendRunner.com <http://www.friendrunner.com/>
>
> http://www.sericontech.com
>
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and
> easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Htmlunit-user mailing list
> Htmlunit-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>
>


-- 
Sander A. Smith
President

Sericon Technology Inc.
71 Marquette Ave.
Toronto, Ontario M6A 1X8
(416)781-3988

Link to me on LinkedIn
http://www.linkedin.com/in/sandersmith

Join our community of people interested in testing Facebook applications
http://www.TestFacebook.com

Learn about advanced tools for testing social networking applications
http://www.FriendRunner.com

http://www.sericontech.com

[Attachment #5 (text/html)]

<div>Ahmed,</div>
<div> </div>
<div>I spent many hours trying to figure this one out. Your solution works great. \
Thanks a lot.</div> <div> </div>
<div>Sander<br><br></div>
<div class="gmail_quote">On Tue, Dec 15, 2009 at 11:09 PM, Ahmed Ashour <span \
dir="ltr">&lt;<a href="mailto:asashour@yahoo.com">asashour@yahoo.com</a>&gt;</span> \
wrote:<br> <blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; \
PADDING-LEFT: 1ex" class="gmail_quote"> <div>
<div style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<div></div>
<div>Hi Sander,</div>
<div> </div>
<div>You can subclass HttpWebConnection, and override getResponse() method, something \
like:</div> <div> </div>
<div>        webClient.setWebConnection(new HttpWebConnection(webClient) {<br>        \
@Override<br>            public WebResponse getResponse(WebRequestSettings \
settings)<br>            throws IOException {<br>                \
                System.out.println(settings.getUrl());<br>
                return super.getResponse(settings);<br>            }<br>        \
});<br></div> <div>Yours,</div>
<div>Ahmed</div>----<br>Blog: <a href="http://asashour.blogspot.com/" \
target="_blank">http://asashour.blogspot.com</a>  <div><font size="2" face="Tahoma">
<hr size="1">
<b><span style="FONT-WEIGHT: bold">From:</span></b> Sander A. Smith &lt;<a \
href="mailto:smithsa@sericontech.com" \
target="_blank">smithsa@sericontech.com</a>&gt;<br><b><span style="FONT-WEIGHT: \
bold">To:</span></b> <a href="mailto:htmlunit-user@lists.sourceforge.net" \
target="_blank">htmlunit-user@lists.sourceforge.net</a><br> <b><span \
style="FONT-WEIGHT: bold">Sent:</span></b> Wed, December 16, 2009 6:00:26 \
AM<br><b><span style="FONT-WEIGHT: bold">Subject:</span></b> [Htmlunit-user] List of \
files downloaded<br></font><br></div> <div>
<div></div>
<div class="h5">
<div style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<div style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<div>I&#39;m trying to create a list of the files (and their URLs) that are \
downloaded in response to an action to load a page. I can see how to get the \
JavaScript files by registering a ScriptPreProcessor, but what do I do about the \
JPGs, CSSs, etc.? How can I be notified when they load?</div>

<div> </div>
<div>Sander<br clear="all"><br>-- <br>Sander A. Smith<br>President<br><br>Sericon \
Technology Inc.<br>71 Marquette Ave.<br>Toronto, Ontario M6A \
1X8<br>(416)781-3988<br><br>Link to me on LinkedIn<br><a \
href="http://www.linkedin.com/in/sandersmith" \
target="_blank">http://www.linkedin.com/in/sandersmith</a><br> <br>Join our community \
of people interested in testing Facebook applications<br><a \
href="http://www.testfacebook.com/" \
target="_blank">http://www.TestFacebook.com</a><br><br>Learn about advanced tools for \
testing social networking applications<br> <a href="http://www.friendrunner.com/" \
target="_blank">http://www.FriendRunner.com</a><br><br><a \
href="http://www.sericontech.com/" \
target="_blank">http://www.sericontech.com</a><br></div></div></div></div></div></div><br>
 </div><br>------------------------------------------------------------------------------<br>This \
SF.Net email is sponsored by the Verizon Developer Community<br>Take advantage of \
Verizon&#39;s best-in-class app development support<br> A streamlined, 14 day to \
market process makes app distribution fast and easy<br>Join now and get one step \
closer to millions of Verizon customers<br><a \
href="http://p.sf.net/sfu/verizon-dev2dev" \
target="_blank">http://p.sf.net/sfu/verizon-dev2dev</a> <br> \
_______________________________________________<br>Htmlunit-user mailing list<br><a \
href="mailto:Htmlunit-user@lists.sourceforge.net">Htmlunit-user@lists.sourceforge.net</a><br><a \
href="https://lists.sourceforge.net/lists/listinfo/htmlunit-user" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/htmlunit-user</a><br> \
<br></blockquote></div><br><br clear="all"><br>-- <br>Sander A. \
Smith<br>President<br><br>Sericon Technology Inc.<br>71 Marquette Ave.<br>Toronto, \
Ontario M6A 1X8<br>(416)781-3988<br><br>Link to me on LinkedIn<br><a \
href="http://www.linkedin.com/in/sandersmith">http://www.linkedin.com/in/sandersmith</a><br>
 <br>Join our community of people interested in testing Facebook applications<br><a \
href="http://www.TestFacebook.com">http://www.TestFacebook.com</a><br><br>Learn about \
advanced tools for testing social networking applications<br> <a \
href="http://www.FriendRunner.com">http://www.FriendRunner.com</a><br><br><a \
href="http://www.sericontech.com">http://www.sericontech.com</a><br>



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 

_______________________________________________
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