Skip to content

Instantly share code, notes, and snippets.

@dannyshain
Created June 18, 2021 20:01
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/5d6f2ad8c56f39f739e3aadb2e6788bd to your computer and use it in GitHub Desktop.
Save dannyshain/5d6f2ad8c56f39f739e3aadb2e6788bd to your computer and use it in GitHub Desktop.
import { Selector } from 'testcafe';
fixture`The Kitchen - Select`
.page`https://kitchen.applitools.com/ingredients/select`
const ingredientsSelect = Selector('#spices-select-single');
const ingredientsOption = ingredientsSelect.find('option');
test('TestCafe', async t => {
await t
.click(ingredientsSelect)
.click(ingredientsOption.withText('Garlic'))
.expect(ingredientsSelect.value).eql('garlic');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment