Skip to content

Fix the page wait condition in testAdvancedForm - #119

Open
aik099 wants to merge 1 commit into
minkphp:masterfrom
aik099:fix-advanced-form-wait
Open

aik099 wants to merge 1 commit into
minkphp:masterfrom
aik099:fix-advanced-form-wait

Conversation

@aik099

@aik099 aik099 commented Oct 24, 2026

Copy link
Copy Markdown
Member

After the form is submitted, testAdvancedForm waits for document.getElementsByTagName("title") === "Advanced form save". That compares an HTMLCollection with a string, so it's never true:

  • JS drivers always wait the full 5 seconds;
  • wait() then returns false, so the posted values and the uploaded file are never checked.

The condition was changed to this in 2befd23 (before that it was !== null, which is always true). Now it's document.title === "Advanced form save", which matches the <title> of advanced_form_post.php.

Tested locally with webdriver-classic-driver on Selenium 3.141.59: the test now takes ~1.5-2s instead of ~5.8s and runs the final assertion (21 instead of 20), on both Brave (as Chrome) and Firefox.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UcEMc87cTLJsvmHf6r9Mkb
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.

1 participant