Closed ElliottDevlinPA closed 2 years ago
Can you record and upload trace for the failing test case? Also you are reusing the same page for to page object models concurrently, is that expected or they are supposed to be two different browser pages (tabs) ?
const loginPage = new LoginPage(page);
const storyPage = new StoryPage(page);
Hi @yury-s, thanks for your response.
Just to clarify - the test isn't failing in that all of the steps complete successfully, the issue is that the session hangs after all of the steps have been completed instead of closing down immediately as would be expected. Re: the two pages, that is expected in that the test only requires a single window/tab.
Regarding the Trace, I wasn't sure which file you need so have uploaded a couple of things - please let me know if they are incorrect and how to find the right file.
Many thanks, Elliott.
@ElliottDevlinPA can you try running with video: 'off'
in your config? Also, what's your OS?
Hi @aslushnikov. I tried setting video to off but still experience the issue. I am on MacOS Big Sur v11.6.1.
@aslushnikov I think I've just found the source of the issue - when I set Trace to 'of' in the config, the issue no longer occurs. However, if the value is 'on' or 'retain-on-failure', the issue occurs.
@ElliottDevlinPA can you please create a simple test repository with all your files so that we can run it locally and debug the behavior?
@aslushnikov unfortunately I don't think I will be able to do that as the application I am testing is not publicly accessible. I will try to replicate the issue against a different site and will create a test repo if I am successful. At least I have a workaround in the meantime. Thanks.
@ElliottDevlinPA thanks! Please file another issue if / when you have a repro!
@aslushnikov was the issue ever tested against a public repo??
The same issue I reproduced in 1.36.0
Hi,
I am using Playwright Test v1.17.1 with TypeScript and have implemented the Page Object Model into my project.
I am experiencing an issue with one of my tests whereby all of the steps complete successfully, but the browser remains open for anywhere between 10 and 30 seconds rather than closing and finishing the test run. It seems to hang longer when run headless. This issue doesn't occur with my other tests - the only difference I can see between them is that the test with the issue interacts with two page objects.
This is my spec file...
This is my Page Object...
And this is my config file...
Are you able to offer any help please?