我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

HTMLUnit Axaj文件下载

I'm trying to download the XLS file from this page: http://www.nordpoolspot.com/Market-data1/Elspot/Area-Prices/ALL1/Hourly/ (click on "Export to XLS" link).

However doing:

page.getAnchorByText("Export to XLS").click().getWebResponse().getContentAsStream();

returns the html of the web page, instead of the expected file.

Do you have any suggestion?

I already tried the 3 points here http://htmlunit.sourceforge.net/faq.html#AJAXDoesNotWork without success.

The following:

webClient = new WebClient(BrowserVersion.FIREFOX_3_6);

fixed my issue.

近期文章

  • AJAX to PHP发送值
  • jQuery Ajax仅在IE中失败
  • 使用Ajax将图像发送到PHP
  • 通过选项卡更新subid
  • Ajax Jquery Slider自动播放
  • asp.net中的聊天应用程序?
  • 如何用AJAX表单提交回车?
  • jQuery-AJAX load()方法帮助
  • 如何通过单击按钮捕获表单的数据?
  • Ajax-jquery警告404
  • Coldfusion Ajax HTML提交
  • WCF和Javascript:找不到
  • 像文本框一样的Google搜索
  • 为什么$.ajax第一次不工作?
  • WordPress菜单-Ajax加载
  • Rails-link_to和button_to
  • Ajax和Grails的傻瓜
  • 为什么Ajax和Jquery不能同时提交表单?
  • 求助:jQuery不加载PHP文件?
  • android 书架增加书本

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华