Open
Description
System info
- Playwright Version: [v1.35.0]
- Operating System: [macOS]
- Browser: [Firefox]
- Other info:
Source code
Make a checkpoint in VSCode with pytest debugger, and when running the file, it runs file. but if you want to execute another function (like going to another url) inside the debugger terminal, it'll fail. the debugger will freeze.
import pytest
from playwright.sync_api import async_playwright, Page
@pytest.fixture(scope="function")
def browser():
with async_playwright() as playwright:
# Use Firefox as the browser
browser = playwright.firefox.launch()
yield browser
browser.close()
@pytest.mark.asyncio
async def test_playwright_with_firefox(browser):
page: Page = await browser.new_page()
await page.goto("https://www.example.com")
assert "Example Domain" in await page.title()
await page.close()
Steps
- Check point somewhere in test
- Control the page to go to somewhere else manually from command line.
Expected
- It gets to that URL
[Describe expected behavior]
Actual
[Describe actual behavior]