JavaScript not executed on certain pages
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java, javascript
- 领域
- backend
调研方向
Start by reproducing the report against the Boerse Frankfurt page and compare HtmlUnit’s output and local storage with the Selenium/ChromeDriver behavior described in the issue. The report provides a WebClient setup but names no source files or tests, so locate the relevant JavaScript execution and storage paths before investigating. Done means the page’s scripts populate the values and local storage as they do in a real browser.
由索引模型根据 Issue 内容生成。
描述
Summary: JavaScript is not executed on some pages like https://www.boerse-frankfurt.de/aktie/tesla-inc?mic=XFRA. (live only during 8-22 CET)
In Detail: My code reads data from web pages that update themselves continously using JavaScript. Works on most websites, but fails on the above (and Stockopedia for that matter).
When tested with a real browser or my own code base using Selenium/ChromeDriver, the website above initially loads filled with zero values. Its JavaScript then updates the values and puts two entries into local storage. With HtmlUnit, site is stuck with initial zero values, no local storage set.
Request is plain vanilla:
WebClient webClient = new WebClient(); webClient.setAjaxController(new NicelyResynchronizingAjaxController()); webClient.setCssErrorHandler(new SilentCssErrorHandler()); webClient.setJavaScriptErrorListener(new SilentJavaScriptErrorListener()); webClient.setIncorrectnessListener(new SilentIncorrectnessListener()); webClient.getOptions().setPrintContentOnFailingStatusCode(false); webClient.getOptions().setPopupBlockerEnabled(false); webClient.getOptions().setDoNotTrackEnabled(true); webClient.getOptions().setMaxInMemory(2 * 1024 * 1024); webClient.getOptions().setThrowExceptionOnScriptError(false); webClient.getOptions().setThrowExceptionOnFailingStatusCode(true); webClient.getOptions().setHistoryPageCacheLimit(0); webClient.getOptions().setHistorySizeLimit(0); HtmlPage page = (HtmlPage) webClient.getPage(url);
- 主要语言
- JavaScript
- 星标
- 952
- 派生
- 183
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
HtmlUnit/htmlunit 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 45/100
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 45/100
查看 HtmlUnit/htmlunit 的全部 Issue
相似的 Issue
-
self-driving
难度 1/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
kind:bug needs-triage
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
status: needs triage
难度 2/5 1-3 小时 新手友好度 78/100
mastra-ai/mastra#28500 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
fossasia/scrum_helper#949 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
Foundryborne/daggerheart#2531 ·
维护者通常 1 天内回复