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 setup my project using cucumber [feature, step definitions and page object classes]. My feature looks like:
Feature: Login
Scenario: Login Functionality
Given I launch home page
Then I click on Sign In
And the login page is launched
My Step Definition file:
const { client } = require('nightwatch-cucumber');
const { defineSupportCode } = require('cucumber');
const homePage = client.page.home();
const loginPage = client.page.login();
defineSupportCode(({ Given, Then, When }) => {
Given('I launch home page', async () => {
// Write code here that turns the phrase above into concrete actions
await homePage
.navigate()
.waitForElementVisible('@body', 1000);
});
Then('I click on Sign In', async () => {
// Write code here that turns the phrase above into concrete actions
homePage
.submit();
});
Then('the login page is launched', async () => {
// Write code here that turns the phrase above into concrete actions
});
});
The result looks like:
Starting selenium server... started - PID: 63132
✔ Element was visible after 311 milliseconds.
.in submit -----
is client: yesssss
..
1 scenario (1 passed)
3 steps (3 passed)
0m05.928s
However the login element doesn't gets clicked. What am I missing here? Can you guide please? I am new to this node and nightwatch. Please help!
Regards
Jas
The text was updated successfully, but these errors were encountered:
I have setup my project using cucumber [feature, step definitions and page object classes].
My feature looks like:
Feature: Login
Scenario: Login Functionality
Given I launch home page
Then I click on Sign In
And the login page is launched
My Step Definition file:
My home page object class is like:
The result looks like:
Starting selenium server... started - PID: 63132
✔ Element was visible after 311 milliseconds.
.in submit -----
is client: yesssss
..
1 scenario (1 passed)
3 steps (3 passed)
0m05.928s
However the login element doesn't gets clicked. What am I missing here? Can you guide please? I am new to this node and nightwatch. Please help!
Regards
Jas
The text was updated successfully, but these errors were encountered: