Rayrun
← Back to Discord Forum

page.evaluate in CI vs local

I have another post here about this but I'm trying to figure this part out specifically. Does page.evaluate act differently in CI vs locally? I've run the same set of tests several times with 150 passing locally, but if I push to CI, I get an error stating execution context was destroyed due to navigation. I'm not using any custom sharding but we are using beforeEach to reset tests.

This thread is trying to answer question "Does `page.evaluate` act differently in CI vs locally and how can the issue be resolved?"

3 replies
refactoreric

Be sure to enable trace files in CI, and to upload them somewhere, so you can easily troubleshoot what's going wrong in CI: https://playwright.dev/docs/trace-viewer-intro

I think it's more likely just a timing issue, because CI agents are usually not as strong as developer PCs.

Would a setTimeout help any?

refactoreric

I don't know enough about the test and about the errors, and the cause of the errors to answer that. Have you had a look at the trace files yet? Trace files and the trace viewer are very convenient, and one of the strongest features of Playwright.

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].