You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a simple google.feature file which launches google , verify title and checks for the presence of search box.
// wantedly making the title to expect "Googlie" instead of "Google" and in the step-definitions I have used "Verify" consciously so my test proceeds further and I expect the tests to proceed with next steps and once the test is completed I should see 1 failure and 3 steps passed.
********************************************************** Feature file********************************
Feature: Google Search
Scenario: Searching Google
Given I open Google's search page
Then the title is "Googlie"
Then the title is "Google"
Then the title is "Google"
And the Google search form exists
I have a simple google.feature file which launches google , verify title and checks for the presence of search box.
// wantedly making the title to expect "Googlie" instead of "Google" and in the step-definitions I have used "Verify" consciously so my test proceeds further and I expect the tests to proceed with next steps and once the test is completed I should see 1 failure and 3 steps passed.
********************************************************** Feature file********************************
Feature: Google Search
Scenario: Searching Google
Given I open Google's search page
Then the title is "Googlie"
Then the title is "Google"
Then the title is "Google"
And the Google search form exists
******************step-definitions/google.js
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.verify.title(title); // consciously used verify
});
Then(/^the Google search form exists$/, () => {
return client.assert.visible('input[name="q"]');
});
The text was updated successfully, but these errors were encountered: