Skip to content

Instantly share code, notes, and snippets.

@dannyshain
Created June 18, 2021 19:59
Show Gist options
  • Save dannyshain/37783f1850e57b37b2ae00ee2bd6301c to your computer and use it in GitHub Desktop.
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('https://kitchen.applitools.com/ingredients/select');
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