webdriver: Wait animation frame callbacks before taking (element) screenshot (#39539)

According to spec, we should wait animation frame callbacks before
taking (element) screenshot. As "element screenshot" would automatically
scroll into view, this solves intermittency.

Testing: Manually tested on pages, and
`take_element_screenshot/scroll_into_view.py` passes stably now.
Fixes: #39306

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
Euclid Ye 2025-09-27 21:29:44 +08:00 committed by GitHub
parent 5f5f2abc0f
commit 6aa82309c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 4 deletions

View file

@ -1,3 +0,0 @@
[scroll_into_view.py]
[test_scroll_into_view]
expected: FAIL