Add "Wait for DOM inactivity" keyword which waits until page is fully loaded/rendered
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, python
- 领域
- testing
调研方向
Issue 提到了 SeleniumLibrary 新增的 Wait for DOM Inactivity 关键字和浏览器端的 Mutation Observer API,但没有指出任何仓库文件或测试。首先定位现有的等待关键字入口及其测试;当该关键字可用于动态页面,且其行为已由测试覆盖时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Prerequisites
- I have searched for similar issues in open tickets and cannot find a duplicate.
- The issue still exists against the latest released version of SeleniumLibrary.
- This is not a usage question or support request. For those, see more details in README.rst: https://github.com/robotframework/SeleniumLibrary#support
- You are not using the Java Selenium2Library: https://github.com/MarketSquare/robotframework-seleniumlibrary-java
- Remember that this is a public forum, so remember to remove all sensitive
information, like username and password.
For issues
Steps to reproduce the issue
N/A
Error messages and additional information
N/A
Expected behavior and actual behavior
N/A
Environment
N/A
Feature Request Background
In an effort to improve page performance, modern web apps load initial content, then load the rest of the data on the page via XHR requests. The page continues to mutate until all additional data is loaded. This is a major problem for old frameworks like Selenium, which simply wait until the initial page loads but do not wait until the content on the page fully loads.
Examples of this loading style can be found on sites like:
airbnb.com
amazon.com
buzzfeed.com
yahoo.com
A workaround we've found extremely useful at my company is to leverage the relatively new Mutation Observer api (docs here).
This mutation observer can be configured to fire a callback every time a node on the DOM is added or mutated. This can be used to detect when the page finally calms down and is ready for the automated test to continue.
Feature Request
My feature request, which I will implement, is to leverage this mutation observer in a new keyword "Wait for DOM Inactivity", which the user can call to wait on the XHR requests on dynamic pages (like those listed above) to finish.
Some key scenarios where this can be used are:
- pretty much any automated test which tests against a single page app
- whenever a button click opens & loads a modal
- on highly performant, dynamic pages which heavily leverage XHR requests (like those listed above)
Let me know if this interests you, I would be more than happy to implement this. I have used SeleniumLibrary extensively and love the library, and would love to contribute to it in any way.
Thank you for reading my request!
- 主要语言
- Python
- 星标
- 1.5k
- 派生
- 787
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
robotframework/SeleniumLibrary 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 67/100
robotframework/SeleniumLibrary#1941 · 3 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 65/100
robotframework/SeleniumLibrary#1833 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
robotframework/SeleniumLibrary#1436 · 5 条评论 ·
-
难度 3/5 1-2 天 新手友好度 58/100
robotframework/SeleniumLibrary#1993 ·
-
难度 4/5 3-5 天 新手友好度 35/100
robotframework/SeleniumLibrary#1992 · 4 条评论 ·
查看 robotframework/SeleniumLibrary 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
instance instance add
难度 1/5 1 小时以内 新手友好度 72/100
searxng/searx-instances#939 · 1 条评论 ·
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100