Add "Wait for DOM inactivity" keyword which waits until page is fully loaded/rendered
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript, python
- Bereich
- testing
Rechercherichtung
Das Issue nennt SeleniumLibrarys neues Keyword Wait for DOM Inactivity und die browserseitige Mutation Observer API, aber keine Repository-Dateien oder Tests. Beginne damit, die vorhandenen Einstiegspunkte der Wait-Keywords und ihre Tests zu finden; abgeschlossen ist die Arbeit, wenn das Keyword für dynamische Seiten verfügbar ist und sein Verhalten durch Tests abgedeckt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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!
- Vorherrschende Sprache
- Python
- Sterne
- 1.5k
- Forks
- 787
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus robotframework/SeleniumLibrary
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
robotframework/SeleniumLibrary#1941 · 3 Kommentare ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 65/100
robotframework/SeleniumLibrary#1833 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
robotframework/SeleniumLibrary#1436 · 5 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 58/100
robotframework/SeleniumLibrary#1993 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
robotframework/SeleniumLibrary#1992 · 4 Kommentare ·
Alle Issues in robotframework/SeleniumLibrary
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag
-
instance instance add
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
searxng/searx-instances#941 · 1 Kommentar ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
FluidNumerics/fluid-walk-blocker#89 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag