Reputation: 245
I am attempting to scan a page using HtmlUnit 2.31. I am simply getting an HtmlPage by URL. However, there seems to be some AJAX calls kicked off by the page (no user interaction). I need to wait for the calls to finish and be "rendered" so I can see the values. Here is my code:
public static void main( String[] args ) throws IOException, InterruptedException {
WebClient webClient = new WebClient(BrowserVersion.CHROME);
webClient.getOptions().setJavaScriptEnabled(true);
webClient.getOptions().setThrowExceptionOnScriptError(false);
webClient.getOptions().setCssEnabled(false);
webClient.setAjaxController(new NicelyResynchronizingAjaxController());
webClient.setJavaScriptTimeout(10000);
String itemsForSalePageURL = "https://miami-dade.realtaxdeed.com/index.cfm?zaction=AUCTION&Zmethod=PREVIEW&AUCTIONDATE=07/24/2018";
HtmlPage previewItemsForSalePage = webClient.getPage(itemsForSalePageURL);
final JavaScriptJobManager tmpJobManager = previewItemsForSalePage.getEnclosingWindow().getJobManager();
while(tmpJobManager.getJobCount()>0){
System.out.println("javascript is still running...");
}
boolean doneLoading = false;
while(!doneLoading){
System.out.println("checking if page is done loading...");
List<HtmlDivision> loadingElements = previewItemsForSalePage.getByXPath("//div[@class = 'Loading']");
if(loadingElements.isEmpty()){
doneLoading = true;
}
}
String contents = previewItemsForSalePage.asXml();
System.out.println( "Run complete." );
}
The problem is: the while(!doneLoading)
loop becomes an infinite loop. The classes that my xpath is searching for never evaluates to anything besides "loading".
One area I am interested in is:
<div id="Area_C" class="Auct_Area" ref="Y" arid="C">
<div tabindex="0" class="Loading"></div>
</div>
In Chrome, this evaluates to
<div id="Area_C" class="Auct_Area" ref="N" arid="C">
<div tabindex="0" id="AITEM_1159704" class="AUCTION_ITEM PREVIEW adc-spacer" aid="1159704" rem="0" isset="1" data-test="check"><div tabindex="0"><div tabindex="0" class="adc-tab"><div tabindex="-1" class="banner-left-side"></div>This item has <strong>complimentary</strong> photos, valuation reports and title information.<div tabindex="-1" class="banner-right-side"></div></div><div tabindex="0" class="AUCTION_STATS"><div tabindex="0" class="ASTAT_MSGA ASTAT_LBL">Auction Status</div><div tabindex="0" class="ASTAT_MSGB Astat_DATA">Canceled per Bankruptcy</div><div tabindex="0" class="ASTAT_MSGC ASTAT_LBL"></div> <div tabindex="0" class="ASTAT_MSGD Astat_DATA"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_Label ASTAT_LBL"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_MSG Astat_DATA"></div></div><div tabindex="0" class="AUCTION_DETAILS adc"> <table class="ad_tab" tabindex="0"><tbody><tr><th class="AD_LBL" scope="row">Auction Type:</th><td class="AD_DTA">FORECLOSURE</td></tr><tr><th class="AD_LBL" scope="row" aria-label="Case Number">Case #:</th><td class="AD_DTA"> 2008-069895-CA-01</td></tr><tr><th class="AD_LBL" scope="row">Final Judgment Amount:</th><td class="AD_DTA">$567,016.30</td></tr><tr><th class="AD_LBL" scope="row">Parcel ID:</th><td class="AD_DTA"> <a href="http://www.miamidade.gov/propertysearch/#/?folio=0420360070830" onclick="return showExitPopup();" target="_blank">04-2036-007-0830</a></td></tr><tr><th class="AD_LBL" scope="row">Property Address:</th><td class="AD_DTA">618 W 65 DR</td></tr><tr><th class="AD_LBL" scope="row"></th><td class="AD_DTA">HIALEAH, FL- 33012</td></tr> <tr><th class="AD_LBL" scope="row">Assessed Value:</th><td class="AD_DTA">$131,793.00</td></tr><tr><th class="AD_LBL" scope="row">Plaintiff max bid:</th><td class="AD_DTA ASTAT_MSGPB">$279,450.00</td></tr></tbody></table></div></div> </div><div class="AUCTION_ITEM_SPACER"> </div><div tabindex="0" id="AITEM_1160530" aria-label="Auction Details" class="AUCTION_ITEM PREVIEW" aid="1160530" rem="0" isset="1"><div class="AUCTION_STATS"><div tabindex="0" class="ASTAT_MSGA ASTAT_LBL">Auction Sold</div><div tabindex="0" class="ASTAT_MSGB Astat_DATA">07/24/2018 09:07 AM ET</div><div tabindex="0" class="ASTAT_MSGC ASTAT_LBL">Amount</div> <div tabindex="0" class="ASTAT_MSGD Astat_DATA">$198,200.00</div><div tabindex="0" class="ASTAT_MSG_SOLDTO_Label ASTAT_LBL">Sold To</div><div tabindex="0" class="ASTAT_MSG_SOLDTO_MSG Astat_DATA">3rd Party Bidder</div></div><div class="AUCTION_DETAILS"><table class="ad_tab" tabindex="0"><tbody><tr><th class="AD_LBL" scope="row">Auction Type:</th><td class="AD_DTA">FORECLOSURE</td></tr><tr><th class="AD_LBL" scope="row" aria-label="Case Number">Case #:</th><td class="AD_DTA"> 2012-007563-CA-01</td></tr><tr><th class="AD_LBL" scope="row">Final Judgment Amount:</th><td class="AD_DTA">$123,600.66</td></tr><tr><th class="AD_LBL" scope="row">Parcel ID:</th><td class="AD_DTA"> <a href="http://www.miamidade.gov/propertysearch/#/?folio=3069350010170" onclick="return showExitPopup();" target="_blank">30-6935-001-0170</a></td></tr><tr><th class="AD_LBL" scope="row">Property Address:</th><td class="AD_DTA">26711 SW 133 CT</td></tr><tr><th class="AD_LBL" scope="row"></th><td class="AD_DTA">MIAMI, FL- 33032</td></tr> <tr><th class="AD_LBL" scope="row">Assessed Value:</th><td class="AD_DTA">$104,378.00</td></tr><tr><th class="AD_LBL" scope="row">Plaintiff max bid:</th><td class="AD_DTA ASTAT_MSGPB">$190,539.81</td></tr></tbody></table></div> </div><div class="AUCTION_ITEM_SPACER"> </div><div tabindex="0" id="AITEM_1156810" aria-label="Auction Details" class="AUCTION_ITEM PREVIEW" aid="1156810" rem="0" isset="1"><div class="AUCTION_STATS"><div tabindex="0" class="ASTAT_MSGA ASTAT_LBL">Auction Status</div><div tabindex="0" class="ASTAT_MSGB Astat_DATA">Canceled per County</div><div tabindex="0" class="ASTAT_MSGC ASTAT_LBL"></div> <div tabindex="0" class="ASTAT_MSGD Astat_DATA"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_Label ASTAT_LBL"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_MSG Astat_DATA"></div></div><div class="AUCTION_DETAILS"><table class="ad_tab" tabindex="0"><tbody><tr><th class="AD_LBL" scope="row">Auction Type:</th><td class="AD_DTA">FORECLOSURE</td></tr><tr><th class="AD_LBL" scope="row" aria-label="Case Number">Case #:</th><td class="AD_DTA"> 2013-006996-CA-01</td></tr><tr><th class="AD_LBL" scope="row">Final Judgment Amount:</th><td class="AD_DTA">$1,060,190.67</td></tr><tr><th class="AD_LBL" scope="row">Parcel ID:</th><td class="AD_DTA"> <a href="http://www.miamidade.gov/propertysearch/#/?folio=3350330550030" onclick="return showExitPopup();" target="_blank">33-5033-055-0030</a></td></tr><tr><th class="AD_LBL" scope="row">Property Address:</th><td class="AD_DTA">17321 SW 93 AVE</td></tr><tr><th class="AD_LBL" scope="row"></th><td class="AD_DTA">PALMETTO BAY, FL- 33157</td></tr> <tr><th class="AD_LBL" scope="row">Assessed Value:</th><td class="AD_DTA">$276,458.00</td></tr><tr><th class="AD_LBL" scope="row">Plaintiff max bid:</th><td class="AD_DTA ASTAT_MSGPB">Hidden</td></tr></tbody></table></div> </div><div class="AUCTION_ITEM_SPACER"> </div><div tabindex="0" id="AITEM_1150473" aria-label="Auction Details" class="AUCTION_ITEM PREVIEW" aid="1150473" rem="0" isset="1"><div class="AUCTION_STATS"><div tabindex="0" class="ASTAT_MSGA ASTAT_LBL">Auction Status</div><div tabindex="0" class="ASTAT_MSGB Astat_DATA">Canceled per Order</div><div tabindex="0" class="ASTAT_MSGC ASTAT_LBL"></div> <div tabindex="0" class="ASTAT_MSGD Astat_DATA"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_Label ASTAT_LBL"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_MSG Astat_DATA"></div></div><div class="AUCTION_DETAILS"><table class="ad_tab" tabindex="0"><tbody><tr><th class="AD_LBL" scope="row">Auction Type:</th><td class="AD_DTA">FORECLOSURE</td></tr><tr><th class="AD_LBL" scope="row" aria-label="Case Number">Case #:</th><td class="AD_DTA"> 2013-009405-CA-01</td></tr><tr><th class="AD_LBL" scope="row">Final Judgment Amount:</th><td class="AD_DTA">$161,175.75</td></tr><tr><th class="AD_LBL" scope="row">Parcel ID:</th><td class="AD_DTA"> <a href="http://www.miamidade.gov/propertysearch/#/?folio=0821280140050" onclick="return showExitPopup();" target="_blank">08-2128-014-0050</a></td></tr><tr><th class="AD_LBL" scope="row">Property Address:</th><td class="AD_DTA">13247 ASWAN RD</td></tr><tr><th class="AD_LBL" scope="row"></th><td class="AD_DTA">OPA-LOCKA, FL- 33054</td></tr> <tr><th class="AD_LBL" scope="row">Assessed Value:</th><td class="AD_DTA">$88,602.00</td></tr><tr><th class="AD_LBL" scope="row">Plaintiff max bid:</th><td class="AD_DTA ASTAT_MSGPB">Hidden</td></tr></tbody></table></div> </div><div class="AUCTION_ITEM_SPACER"> </div><div tabindex="0" id="AITEM_1159431" aria-label="Auction Details" class="AUCTION_ITEM PREVIEW" aid="1159431" rem="0" isset="1"><div class="AUCTION_STATS"><div tabindex="0" class="ASTAT_MSGA ASTAT_LBL">Auction Sold</div><div tabindex="0" class="ASTAT_MSGB Astat_DATA">07/24/2018 09:14 AM ET</div><div tabindex="0" class="ASTAT_MSGC ASTAT_LBL">Amount</div> <div tabindex="0" class="ASTAT_MSGD Astat_DATA">$390,200.00</div><div tabindex="0" class="ASTAT_MSG_SOLDTO_Label ASTAT_LBL">Sold To</div><div tabindex="0" class="ASTAT_MSG_SOLDTO_MSG Astat_DATA">3rd Party Bidder</div></div><div class="AUCTION_DETAILS"><table class="ad_tab" tabindex="0"><tbody><tr><th class="AD_LBL" scope="row">Auction Type:</th><td class="AD_DTA">FORECLOSURE</td></tr><tr><th class="AD_LBL" scope="row" aria-label="Case Number">Case #:</th><td class="AD_DTA"> 2014-012973-CA-01</td></tr><tr><th class="AD_LBL" scope="row">Final Judgment Amount:</th><td class="AD_DTA">$255,004.82</td></tr><tr><th class="AD_LBL" scope="row">Parcel ID:</th><td class="AD_DTA"> <a href="http://www.miamidade.gov/propertysearch/#/?folio=0141210071790" onclick="return showExitPopup();" target="_blank">01-4121-007-1790</a></td></tr><tr><th class="AD_LBL" scope="row">Property Address:</th><td class="AD_DTA">3321 FROW AVE</td></tr><tr><th class="AD_LBL" scope="row"></th><td class="AD_DTA">MIAMI, FL- 33133</td></tr> <tr><th class="AD_LBL" scope="row">Assessed Value:</th><td class="AD_DTA">$199,959.00</td></tr><tr><th class="AD_LBL" scope="row">Plaintiff max bid:</th><td class="AD_DTA ASTAT_MSGPB">$287,550.00</td></tr></tbody></table></div> </div><div class="AUCTION_ITEM_SPACER"> </div><div tabindex="0" id="AITEM_1145542" aria-label="Auction Details" class="AUCTION_ITEM PREVIEW" aid="1145542" rem="0" isset="1"><div class="AUCTION_STATS"><div tabindex="0" class="ASTAT_MSGA ASTAT_LBL">Auction Status</div><div tabindex="0" class="ASTAT_MSGB Astat_DATA">Canceled per Bankruptcy</div><div tabindex="0" class="ASTAT_MSGC ASTAT_LBL"></div> <div tabindex="0" class="ASTAT_MSGD Astat_DATA"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_Label ASTAT_LBL"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_MSG Astat_DATA"></div></div><div class="AUCTION_DETAILS"><table class="ad_tab" tabindex="0"><tbody><tr><th class="AD_LBL" scope="row">Auction Type:</th><td class="AD_DTA">FORECLOSURE</td></tr><tr><th class="AD_LBL" scope="row" aria-label="Case Number">Case #:</th><td class="AD_DTA"> 2014-020812-CA-01</td></tr><tr><th class="AD_LBL" scope="row">Final Judgment Amount:</th><td class="AD_DTA">$294,642.58</td></tr><tr><th class="AD_LBL" scope="row">Parcel ID:</th><td class="AD_DTA"> <a href="http://www.miamidade.gov/propertysearch/#/?folio=3050290190190" onclick="return showExitPopup();" target="_blank">30-5029-019-0190</a></td></tr><tr><th class="AD_LBL" scope="row">Property Address:</th><td class="AD_DTA">15900 SW 105 AVE</td></tr><tr><th class="AD_LBL" scope="row"></th><td class="AD_DTA">MIAMI, FL- 33157</td></tr> <tr><th class="AD_LBL" scope="row">Assessed Value:</th><td class="AD_DTA">$153,877.00</td></tr><tr><th class="AD_LBL" scope="row">Plaintiff max bid:</th><td class="AD_DTA ASTAT_MSGPB">Hidden</td></tr></tbody></table></div> </div><div class="AUCTION_ITEM_SPACER"> </div><div tabindex="0" id="AITEM_1144806" class="AUCTION_ITEM PREVIEW adc-spacer" aid="1144806" rem="0" isset="1" data-test="check"><div tabindex="0"><div tabindex="0" class="adc-tab"><div tabindex="-1" class="banner-left-side"></div>This item has <strong>complimentary</strong> photos, valuation reports and title information.<div tabindex="-1" class="banner-right-side"></div></div><div tabindex="0" class="AUCTION_STATS"><div tabindex="0" class="ASTAT_MSGA ASTAT_LBL">Auction Status</div><div tabindex="0" class="ASTAT_MSGB Astat_DATA">Canceled per Order</div><div tabindex="0" class="ASTAT_MSGC ASTAT_LBL"></div> <div tabindex="0" class="ASTAT_MSGD Astat_DATA"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_Label ASTAT_LBL"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_MSG Astat_DATA"></div></div><div tabindex="0" class="AUCTION_DETAILS adc"> <table class="ad_tab" tabindex="0"><tbody><tr><th class="AD_LBL" scope="row">Auction Type:</th><td class="AD_DTA">FORECLOSURE</td></tr><tr><th class="AD_LBL" scope="row" aria-label="Case Number">Case #:</th><td class="AD_DTA"> 2015-002717-CA-01</td></tr><tr><th class="AD_LBL" scope="row">Final Judgment Amount:</th><td class="AD_DTA">$500,378.48</td></tr><tr><th class="AD_LBL" scope="row">Parcel ID:</th><td class="AD_DTA"> <a href="http://www.miamidade.gov/propertysearch/#/?folio=3020030381200" onclick="return showExitPopup();" target="_blank">30-2003-038-1200</a></td></tr><tr><th class="AD_LBL" scope="row">Property Address:</th><td class="AD_DTA">19522 NW 77 CT</td></tr><tr><th class="AD_LBL" scope="row"></th><td class="AD_DTA">HIALEAH , FL- 33015</td></tr> <tr><th class="AD_LBL" scope="row">Assessed Value:</th><td class="AD_DTA">$273,509.00</td></tr><tr><th class="AD_LBL" scope="row">Plaintiff max bid:</th><td class="AD_DTA ASTAT_MSGPB">Hidden</td></tr></tbody></table></div></div> </div><div class="AUCTION_ITEM_SPACER"> </div><div tabindex="0" id="AITEM_1155118" aria-label="Auction Details" class="AUCTION_ITEM PREVIEW" aid="1155118" rem="0" isset="1"><div class="AUCTION_STATS"><div tabindex="0" class="ASTAT_MSGA ASTAT_LBL">Auction Sold</div><div tabindex="0" class="ASTAT_MSGB Astat_DATA">07/24/2018 09:20 AM ET</div><div tabindex="0" class="ASTAT_MSGC ASTAT_LBL">Amount</div> <div tabindex="0" class="ASTAT_MSGD Astat_DATA">$373,100.00</div><div tabindex="0" class="ASTAT_MSG_SOLDTO_Label ASTAT_LBL">Sold To</div><div tabindex="0" class="ASTAT_MSG_SOLDTO_MSG Astat_DATA">3rd Party Bidder</div></div><div class="AUCTION_DETAILS"><table class="ad_tab" tabindex="0"><tbody><tr><th class="AD_LBL" scope="row">Auction Type:</th><td class="AD_DTA">FORECLOSURE</td></tr><tr><th class="AD_LBL" scope="row" aria-label="Case Number">Case #:</th><td class="AD_DTA"> 2015-004160-CA-01</td></tr><tr><th class="AD_LBL" scope="row">Final Judgment Amount:</th><td class="AD_DTA">$650,255.11</td></tr><tr><th class="AD_LBL" scope="row">Parcel ID:</th><td class="AD_DTA"> <a href="http://www.miamidade.gov/propertysearch/#/?folio=3049090040080" onclick="return showExitPopup();" target="_blank">30-4909-004-0080</a></td></tr><tr><th class="AD_LBL" scope="row">Property Address:</th><td class="AD_DTA">15495 SW 13 TER</td></tr><tr><th class="AD_LBL" scope="row"></th><td class="AD_DTA">MIAMI, FL- 33194</td></tr> <tr><th class="AD_LBL" scope="row">Assessed Value:</th><td class="AD_DTA">$267,671.00</td></tr><tr><th class="AD_LBL" scope="row">Plaintiff max bid:</th><td class="AD_DTA ASTAT_MSGPB">$339,375.00</td></tr></tbody></table></div> </div><div class="AUCTION_ITEM_SPACER"> </div><div tabindex="0" id="AITEM_1155459" aria-label="Auction Details" class="AUCTION_ITEM PREVIEW" aid="1155459" rem="0" isset="1"><div class="AUCTION_STATS"><div tabindex="0" class="ASTAT_MSGA ASTAT_LBL">Auction Status</div><div tabindex="0" class="ASTAT_MSGB Astat_DATA">Canceled per Order</div><div tabindex="0" class="ASTAT_MSGC ASTAT_LBL"></div> <div tabindex="0" class="ASTAT_MSGD Astat_DATA"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_Label ASTAT_LBL"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_MSG Astat_DATA"></div></div><div class="AUCTION_DETAILS"><table class="ad_tab" tabindex="0"><tbody><tr><th class="AD_LBL" scope="row">Auction Type:</th><td class="AD_DTA">FORECLOSURE</td></tr><tr><th class="AD_LBL" scope="row" aria-label="Case Number">Case #:</th><td class="AD_DTA"> 2015-005595-CA-01</td></tr><tr><th class="AD_LBL" scope="row">Final Judgment Amount:</th><td class="AD_DTA">$217,737.00</td></tr><tr><th class="AD_LBL" scope="row">Parcel ID:</th><td class="AD_DTA"> <a href="http://www.miamidade.gov/propertysearch/#/?folio=0140010210019" onclick="return showExitPopup();" target="_blank">01-4001-021-0019</a></td></tr><tr><th class="AD_LBL" scope="row">Property Address:</th><td class="AD_DTA">6261 TAMIAMI CANAL RD</td></tr><tr><th class="AD_LBL" scope="row"></th><td class="AD_DTA">MIAMI, FL- 33126</td></tr> <tr><th class="AD_LBL" scope="row">Assessed Value:</th><td class="AD_DTA">$153,080.00</td></tr><tr><th class="AD_LBL" scope="row">Plaintiff max bid:</th><td class="AD_DTA ASTAT_MSGPB">Hidden</td></tr></tbody></table></div> </div><div class="AUCTION_ITEM_SPACER"> </div><div tabindex="0" id="AITEM_1151163" aria-label="Auction Details" class="AUCTION_ITEM PREVIEW" aid="1151163" rem="0" isset="1"><div class="AUCTION_STATS"><div tabindex="0" class="ASTAT_MSGA ASTAT_LBL">Auction Status</div><div tabindex="0" class="ASTAT_MSGB Astat_DATA">Canceled per Order</div><div tabindex="0" class="ASTAT_MSGC ASTAT_LBL"></div> <div tabindex="0" class="ASTAT_MSGD Astat_DATA"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_Label ASTAT_LBL"></div><div tabindex="0" class="ASTAT_MSG_SOLDTO_MSG Astat_DATA"></div></div><div class="AUCTION_DETAILS"><table class="ad_tab" tabindex="0"><tbody><tr><th class="AD_LBL" scope="row">Auction Type:</th><td class="AD_DTA">FORECLOSURE</td></tr><tr><th class="AD_LBL" scope="row" aria-label="Case Number">Case #:</th><td class="AD_DTA"> 2015-022277-CA-01</td></tr><tr><th class="AD_LBL" scope="row">Final Judgment Amount:</th><td class="AD_DTA">$374,062.43</td></tr><tr><th class="AD_LBL" scope="row">Parcel ID:</th><td class="AD_DTA"> <a href="http://www.miamidade.gov/propertysearch/#/?folio=3040280070030" onclick="return showExitPopup();" target="_blank">30-4028-007-0030</a></td></tr><tr><th class="AD_LBL" scope="row">Property Address:</th><td class="AD_DTA">6020 SW 92 AVE</td></tr><tr><th class="AD_LBL" scope="row"></th><td class="AD_DTA">MIAMI, FL- 33173</td></tr> <tr><th class="AD_LBL" scope="row">Assessed Value:</th><td class="AD_DTA">$208,500.00</td></tr><tr><th class="AD_LBL" scope="row">Plaintiff max bid:</th><td class="AD_DTA ASTAT_MSGPB">Hidden</td></tr></tbody></table></div> </div><div class="AUCTION_ITEM_SPACER"> </div>
</div>
I am not sure what else to try at this point. I have tried changing the BrowserVersion. I have tried increasing the JavaScriptTimeout. I tried using the NicelyResynchronizingAjaxController. I even wait until all javascript is done processing. I think I am missing some fundamental piece of understanding. Can someone please fill me in.
Upvotes: 0
Views: 266
Reputation: 2889
Here comes the workaround
String url = "https://miami-dade.realtaxdeed.com/index.cfm?zaction=AUCTION&Zmethod=PREVIEW&AUCTIONDATE=07/24/2018";
try (final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_60)) {
webClient.setWebConnection(new FalsifyingWebConnection(webClient) {
@Override
public WebResponse getResponse(WebRequest webRequest) throws IOException {
if (webRequest.getUrl().getPath().endsWith("jquery-1.6.1.min.js")) {
String jQuery = FileUtils.readFileToString(new File("jquery-1.6.1.js"));
return createWebResponse(webRequest, jQuery, "application/javascript");
}
return super.getResponse(webRequest);
}
});
HtmlPage previewItemsForSalePage = webClient.getPage(url);
webClient.waitForBackgroundJavaScript(1000);
System.out.println("----------------");
System.out.println(previewItemsForSalePage.asText());
}
And here some notes:
At least here I got the same content as in real browsers.
Upvotes: 1
Reputation: 2889
Have done a quick check, this is an issue with jQuery 1.6.1 (see issue 1835). Because this only happens with the minimized version of jQuery this is really hard to fix (had to be done in Rhino at last). Any help is welcome....
Upvotes: 1