I am trying to implement sharding in Jenkins. I have a very simple example (trying to emulate sharding by following example in 1.37 release) But some of the test case fail randomly due to Error: page.textContent: Page closed
wait for locator('div[class='\card body recipe card text secondary']>div>h4').first()
Pending operations: -page.textContent at example.ts .....
I think it might be due to async condition but I am not sure . Could someone please suggest?
This thread is trying to answer question "Why does the 'Page closed' error occur when running test cases in Jenkins with sharding implemented, and how can it be resolved?"
looks like the element is not there. We strongly discourage from using textContent, use toHaveText instead: https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text
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].