Skip to content

Instantly share code, notes, and snippets.

Created June 18, 2021 19:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dannyshain/37783f1850e57b37b2ae00ee2bd6301c to your computer and use it in GitHub Desktop.
const { chromium } = require('playwright')
describe('Playwright + Jest', () => {
test('should select an ingredient from the list', async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('');
await page.selectOption('#spices-select-single', 'garlic');
expect(await page.$eval("#spices-select-single", node => node.value)).toBe('garlic');
await browser.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment