-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9547c7f
commit 6d3d8fb
Showing
1 changed file
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import pytest | ||
from playwright.async_api import async_playwright | ||
from playwright.async_api import Page, Browser | ||
|
||
@pytest.mark.parametrize("browser_name", ["chromium", "firefox", "webkit"]) | ||
async def test_firstload(browser_name, browser_type, context): | ||
browser = await browser_type.launch() | ||
page = await context.new_page() | ||
await page.goto("https://joshuamae.com") | ||
async def test_firstload(browser_name, browser_type_launch): | ||
browser: Browser = await browser_type_launch(browser_name) | ||
context = await browser.new_context() | ||
page: Page = await context.new_page() | ||
await page.goto("https://example.com") | ||
title = await page.title() | ||
assert title == "Joshua Mae", f"Title was '{title}', but expected 'Joshua Mae'" | ||
await browser.close() | ||
assert title == "Example Domain", f"Title was '{title}', but expected 'Example Domain'" | ||
await browser.close() |