-
-
Save angiejones/9fb37df888b933962866a64dd1e07a10 to your computer and use it in GitHub Desktop.
Playwright - simple test to verify page title
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
const { chromium } = require('playwright') | |
const assert = require('assert') | |
describe('Automation Bookstore', function () { | |
let browser, page | |
before(async () => { | |
browser = await chromium.launch() | |
}) | |
after(async () => { | |
await browser.close() | |
}) | |
beforeEach(async () => { | |
page = await browser.newPage() | |
await page.goto('https://automationbookstore.dev/') | |
}) | |
afterEach(async () => { | |
await page.close() | |
}) | |
it('should have title', async () => { | |
assert.equal(await page.innerText('#page-title'), 'Automation Bookstore') | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment