Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 17, 2020 06:51
  • 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
Embed
What would you like to do?
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