Questions tagged [nightwatch]

This tag should be used to ask questions about the e2e testing framework Nightwatch

This tag should be used to ask questions about the e2e testing framework Nightwatch

Nightwatch.js is an automated testing framework for web applications and websites, written in Node.js and using the W3C WebDriver API

123 questions
1
vote
2 answers

Click on XPath-selected href link in Nightwatch?

How to click on a href link in Nightwatch? The href text is identical to each other so I can't use XPath text. I tried: browser.useXpath().click("//a[href='./basket/removeItem.html?id=5de6710f75a5750f3d88495b')]"); but that doesn't work.
Jaap Joop
  • 23
  • 5
1
vote
2 answers

Nightwatch .execute() how to pass parameter to execute function, is it possible?

Please be patient - I am a beginner in programming. Tester for long time but programming is not my domain. My test is: from the backend I get some list with some element (e.g. 5 text strings) I click some element on page which displayed those 5…
1
vote
1 answer

Selecting tabindex in Nightwatch

Im trying to select an specific button in my page, but nightwatch can't seem to find it. If I try to call it by class, it works but doesn't select the button that I want it to
disconnectedLynx
  • 101
  • 1
  • 11
1
vote
0 answers

getting Cannot find module 'nightwatch/lib/runner/run'

nightwatch.conf.js require('nightwatch-cucumber')({ cucumberArgs: ['--require', 'step_definitions', '--format', 'json:reports/cucumber.json', 'features'] }) module.exports = { 'src_folders': ['tests'], 'page_objects_path': ['pages'], 'webdriver':…
1
vote
2 answers

Cucumber testing example is not running

I have setup a working nightwatch environment and now want to use cucumber for testing. I have followed this guide: https://www.youtube.com/watch?v=Jdlsv0CQ2CY&t=22s. No matter what I try I cannot get the test to work, I get this as output: >…
1
vote
2 answers

Making a custom group of defined chaining methods in js

The question is related to general js programming, but I'll use nightwatch.js as an example to elaborate my query. NightWatch JS provides various chaining methods for its browser components, like: - browser …
1
vote
1 answer

Cannot Run Nightwatch Tests in Safari

I have followed all instructions in the Nightwatch docs and followed many issues in github. I believe I have the correct setup in my nightwatch.json for safari. Safari does launch when I run a test against it but then all the commands in my test…
1
vote
0 answers

Nightwatch: wait for new email from gmail

I am needing to use Nightwatch to wait until a new email is received from Gmail containing a temporary password. Sometimes the email is received within seconds, and it's easily obtainable, but sometimes it will take a little long and I'm needing to…
1
vote
0 answers

Nightwatch FireFox60 and geckodriver MoveTo fails with unknown command

I am a new user to Nightwatch and am trying to convert a large number of tests to use the latest version of Nightwatch 1.1.12. My requirements are to use the following set up: Nightwatch 1.12.1 Firefox 60.8.0esr and Chrome 74 Gecko driver 1.7.1 …
career2
  • 11
  • 1
  • 5
1
vote
1 answer

'SyntaxError: Invalid or unexpected token' Appears When Entering 'npm run debug' in Terminal

I am new to Node and am trying to set up Nightwatch so I can run automated tests and practice my testing skills. I also want to clarify that I am on a Windows 10 computer. I am currently having issues with running 'npm run debug' as I have it set to…
1
vote
1 answer

How do you load multiple chrome extensions when running nightwatch tests?

I've figured out how to run one chrome extension by using the following: { "src_folders" : ["test"], "webdriver" : { "start_process": true, "server_path": "node_modules/.bin/chromedriver", "cli_args": ["--verbose"], "port":…
zero_cool
  • 3,960
  • 5
  • 39
  • 54
0
votes
0 answers

How do i upgrade my nightwatch from version 1.7 to the latest nightwatch version

I have npm installed but unsure of what command to use to upgrade to v3 of nightwatch please help i have ran 'npm install nightwatch' but it is still using the old version New to all of this so some help is appreciated. Thankyou
Lailaa
  • 1
0
votes
0 answers

How can i test text color of an element by nightwatch.js

whenever I enter more than >140 it is text getting red color. I want to verify text color getting is red or not. My HTML element like this css selector: #root > div > main…
0
votes
0 answers

How to get text of an array of elements using Nightwatch?

I have an array of multiple elements and I need to check the inner text of each ones. It won't be a problem if I had only one element, because I would call element.getText() method on it. But I don't know what to do with an array of elements. Here…
Grogro
  • 1
0
votes
1 answer

Binary location error while testing with Firefox

I have this github.js file with some tests: module.exports = { const homeToLoginPage = () => { client .url(homeURL) ... }; const incorrectLoginFlow = () => { client …
1 2
3
8 9