Skip to content

[KOB-53267][KOB-53091] Wait for swipe/drag animation to settle before next command#65

Merged
d4rkwinz merged 1 commit into
masterfrom
KOB-53267
Jun 1, 2026
Merged

[KOB-53267][KOB-53091] Wait for swipe/drag animation to settle before next command#65
d4rkwinz merged 1 commit into
masterfrom
KOB-53267

Conversation

@chuong777
Copy link
Copy Markdown
Contributor

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) after swipeByPoint / _swipe and after drag
  • sleep(IDLE_DELAY) after the inertial swipeToTop

Verification

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

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>
@chuong777 chuong777 changed the title [KOB-53267] Wait for swipe/drag animation to settle before next command [KOB-53267][KOB-53091] Wait for swipe/drag animation to settle before next command Jun 1, 2026
@d4rkwinz d4rkwinz merged commit 04762b5 into master Jun 1, 2026
2 checks passed
@d4rkwinz d4rkwinz deleted the KOB-53267 branch June 2, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants