mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.03k stars 1.51k forks source link

How to wait until a page is fully loaded? #2071

Closed prRZ5F4LXZ closed 1 year ago

prRZ5F4LXZ commented 1 year ago

I use the following HTTP request to access the page source. It appears to get the page source at the time when the request is received. When the page is still loaded (e.g., by javascript), whatever will be loaded later is not available in the result.

curl -s http://127.0.0.1:<port_id>/session/<sesion_id>/source

If I want to wait to make sure some element is available or until the page is fully loaded, do I have to periodically get the source and check it? Or this is a more efficient way to help me achieve this goal without having to wait for more time than unnecessary.

System

Testcase

NA

Stacktrace

NA

Trace-level log

NA

whimboo commented 1 year ago

As I have said in the other issues please get it in contact via the given communication channel. The issue tracker here is not for support questions but for bug issues and feature requests.

https://chat.mozilla.org/#/room/#webdriver:mozilla.org