Conversation
W3C gesture calls (perform/actions/swipe) return as soon as the gesture is dispatched, not when the animation finishes. Scroll inertia keeps the content moving, so the next recorded command runs against a still-scrolling screen and lands on the wrong target, failing a step or two later. Add a post-gesture wait (sleep(duration) after swipe/drag, sleep(IDLE_DELAY) after the inertial swipeToTop) across all four language templates so each action sees a stable screen. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d4rkwinz
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Generated tests intermittently fail a step or two after a swipe/scroll: the post-gesture command lands on the wrong element/coordinate, leaving the screen in an unexpected state, and a later element is not found.
Root cause
The W3C gesture calls (
driver.perform(...)/driver.actions(...)/driver.swipe(...)) return as soon as the gesture is dispatched, not when the swipe/scroll animation finishes. Scroll inertia keeps the content moving after the call returns, so the next recorded command executes against a still-scrolling screen.This is language-agnostic — not specific to the Python client and unrelated to click-body shape or flex-correct (see KOB-53267 discussion).
Fix
Add a post-gesture wait so each action sees a stable screen, in all four templates (
java,python,csharp,nodejs):sleep(duration)afterswipeByPoint/_swipeand afterdragsleep(IDLE_DELAY)after the inertialswipeToTopVerification
Baseline session 8671449 (Pixel 8 Pro / Android 16, Kobiton Expense Tracker) — the recorded flow includes a scroll on the Add Expense form followed by taps; with the wait added, the post-scroll steps hit their targets and the run completes.
Jira: KOB-53267
🤖 Generated with Claude Code