-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Playwright fills out a test value into the wrong form field while testing a form submission #17378
Comments
Does it happen with every browser? Can you provide us a repro which we can run locally? |
It happens for only Chromium browser. Unfortunately, I am not able to share the repo with you |
Then we unfortunately have to assume that it's an issue within your application, if you are able to share a repro in the future, then feel free to file a new issue with it. closing for now since we can't act on it. |
Just wanted to add here that we were experiencing the same thing in a project and the reason was a delayed explicit autofocus ( |
Our application does the same thing when a form appears, it gives focus to the first input field it finds ( Could there be some sort of implementation (or an event listener for the @Krisell Could you share how you let the application know it was Playwright running? I've tested some with environment variables, but that doesn't seem to work. Much appreciated! |
Found a solution posted here, re-posting it here for quick reference. test.beforeEach(async ({ page, context }) => {
await context.addInitScript(() => (window.isUnderTest = true));
}); Then use |
Here's how we do that: #9468 (comment) |
Context:
Code Snippet
Describe the bug
I detected some strange behaviour while filling out the multiple fields, it's not happening every time, but it does happened sometimes. Instead of filling out the password into confirm password field, it was filling out into user email field. What would make this happen?
The text was updated successfully, but these errors were encountered: