Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 17, 2020 06:51
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 velotiotech/a54c03c982252d1a85034f05435ba6da to your computer and use it in GitHub Desktop.
Save velotiotech/a54c03c982252d1a85034f05435ba6da to your computer and use it in GitHub Desktop.
const { client } = require('nightwatch-api');
const { Given, Then, When } = require('cucumber');
Given(/^I open Google's search page$/, () => {
return client.url('http://google.com').waitForElementVisible('body', 1000);
});
Then(/^the title is "([^"]*)"$/, title => {
return client.assert.title(title);
});
Then(/^the Google search form exists$/, () => {
return client.assert.visible('input[name="q"]');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment