You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to do UI automtion with pytest-asyncio and pytest-playwright, I got exception like: RuntimeError: Cannot run the event loop while another loop is running
I'm finding this an issue for a slightly different reason. Some of my tests are async but most are not, and none of the tests that use Playwright are async. Unfortunately, the tests that use Playwright cause an event loop to be opened for the remainder of the session as a result of the browser fixture with session scope. This then conflicts with my async tests trying to open a new event loop, causing the exception RuntimeError: Cannot run the event loop while another loop is running. I need asyncio for some of my other tests, so this is an issue.
I guess I can override the browser fixture so that it is module scope or even more granular, but do you have any other ideas or advice?
Your question
When trying to do UI automtion with pytest-asyncio and pytest-playwright, I got exception like: RuntimeError: Cannot run the event loop while another loop is running
Code structure:
ui2/conftest.py
ui2/test_bing.py
env:
Detail exception as below:
The text was updated successfully, but these errors were encountered: