Skip to content

Instantly share code, notes, and snippets.

@dannyshain
Created June 18, 2021 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dannyshain/f65b25ecfc5a522593ec5f4b367ae0ac to your computer and use it in GitHub Desktop.
Save dannyshain/f65b25ecfc5a522593ec5f4b367ae0ac to your computer and use it in GitHub Desktop.
const puppeteer = require('puppeteer')
describe('Puppeteer + Jest', () => {
test('should select an ingredient from the list', async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://kitchen.applitools.com/ingredients/select');
await page.select('#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