-
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
I keep getting locator.click: Target closed
on GitHub CI while everything passes on my local environment
#19322
Comments
i am also getting same issue today. many times locator.click: Target closed
|
@Onokaev usually that is how a missing It's harder to say anything more than this without the actual repro that we can look at & debug. Feel free to re-file with a proper repro so that we can be more helpful! |
Your report does not give us much to work with. We can't run it (we can't even copy code from an image). And you did not provide us with an actual error message - which click did not work? I can see at least 3 clicks in the snippet, you know which one failed, we don't. When something like this happens, you should use debugging tools to locate the problem. Did you look at the trace? It would probably point you to the problem immediately. If not, could you attach it? Note that it might have sensitive information, so if that is the case you need to pass it to us via non-GitHub public channels. I don't think you are missing any awaits, in fact you have more than needed: This does not need an await: await expect(popup).toBeDefined() This does not need an await, the next check is a noop, const finalStep = await page.locator('...') |
I have re-created the part that's causing the problem here: https://codesandbox.io/s/eager-moore-wygo9m |
I ran your script and it passed for me. It does not seem to follow the best practices for the authentication, but it worked. You should also remove all the toBeDefined and waitForTimeout calls, they only make the test go slower. |
Closing as per above, please feel free to open a new issue if this does not cover your use case. |
Here is a snippet of where we are experiencing the problem
The text was updated successfully, but these errors were encountered: