Add "Wait for DOM inactivity" keyword which waits until page is fully loaded/rendered
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- javascript, python
- Domínio
- testing
Direção de pesquisa
A issue menciona a nova keyword Wait for DOM Inactivity da SeleniumLibrary e a API Mutation Observer no lado do navegador, mas não indica arquivos do repositório nem testes. Comece localizando os pontos de entrada existentes das keywords de espera e seus testes; o trabalho estará concluído quando a keyword estiver disponível para páginas dinâmicas e seu comportamento estiver coberto por testes.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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!
- Linguagem predominante
- Python
- Estrelas
- 1.5k
- Forks
- 787
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de robotframework/SeleniumLibrary
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
robotframework/SeleniumLibrary#1941 · 3 comentários ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 65/100
robotframework/SeleniumLibrary#1833 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
robotframework/SeleniumLibrary#1436 · 5 comentários ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 58/100
robotframework/SeleniumLibrary#1993 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
robotframework/SeleniumLibrary#1992 · 4 comentários ·
Todas as issues de robotframework/SeleniumLibrary
Issues semelhantes
-
pydanty:is-working
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
pydantic/pydantic-ai#8843 ·
Mantenedores costumam responder em até 1 dia
-
breaking change enhancement server
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
sktime/sktime#11310 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia