Questions tagged [nightwatch.js]

Nightwatch.js is an easy to use Node.js based End-to-End (E2E) testing solution for browser based apps and websites.

Nightwatch.js is an easy to use Node.js based End-to-End (E2E) testing solution for browser based apps and websites. It uses the powerful Selenium WebDriver API to perform commands and assertions on DOM elements.


Resources


See Also

1485 questions
0
votes
2 answers

Why am I unable to assign an object value to a particular variable in Nightwatch.js

I am writing a test script in Nightwatch.js and before I click this element I am grabbing the containing text and picking out the value field and assigning this to an externally assigned variable. The problem I am having is that the value is not…
Lampy14
  • 53
  • 1
  • 4
0
votes
1 answer

How can i use Jenkins Build step - Windows Batch command to start nightwatch test?

Within Jenkins Build Step, if i want to use Windows Batch command to start a nightwatch test and view results, what syntax do i use Already tried: start nightwatch -t tests\google.js it doesnt do it. I can run the test on windows cmd, but not via…
priia9
  • 11
  • 4
0
votes
1 answer

Test context missing in before and after test hook in nightwatch js globals

I have multiple nightwatch tests with setup and teardown in every single test. I am trying to unify it into globalModule.js in before after(path set in globals_path in nightwatch.json). //globalModule.js before:function(test, callback){ // do…
user461112
  • 3,811
  • 3
  • 20
  • 25
0
votes
3 answers

nightwatch js while loop

I'm new to node and nightwatch. Been working with Selenium for a number of years but my company has moved over to all things node. Anyway, in nightwatch I am trying to click a link while its visible and loop and keep clicking it until it is not.…
qairish83
  • 1
  • 1
  • 2
0
votes
1 answer

Testing authenticated / unauthenticated download links with Nightwatch.js

I know there is a very similar question here: Testing download links with Nightwatch.js, but this case is slighly different. I'm trying to test a download using nightwatch too, but it's not that simple due to the browser behavious which present a…
Tricote
  • 1,508
  • 1
  • 13
  • 21
0
votes
1 answer

Adding a chaining .not() custom assertion for nightwatch.js

I'm using nightwatch.js to do some ui integration tests and I didn't find any functionality that allows me to assert for the opposite of an expectation. I remember I used to have a .not() method in jasmine.js and I am looking for that kind of…
NLev
  • 1
  • 2
0
votes
2 answers

Global variable in nightwatch. Issue in for loop for node.js

I am currently working with node + nightwatch + selenium for automation. I came across a scenario: I have defined an array as Global array in nightwatch: Dev.js 'checkforLink':{ link1:"Some Xpath 1", link1:"Some Xpath 2", link1:"Some…
0
votes
1 answer

Selenium Grid - Webdriver - Whitescreens when running tests

So typically I do these steps to run a test Start selenium grid (java -jar selenium-server-standalone-2.39.0.jar -role hub // java -jar selenium-server-standalone-2.39.0.jar -role node) Run a test script (node test.js // nightwatch test.js | node…
chrismillah
  • 3,704
  • 2
  • 14
  • 20
0
votes
2 answers

How do i set content of a tinyMCE using Nightwatch.js

I am testing a webapp with nightwatchjs. I need to be able to set the content of a tinyMCE container. I have tried the simple .setContent for a tinyMCE object but it throws a reference error saying tinyMCE is not defined.
BrandenB171
  • 294
  • 4
  • 20
0
votes
1 answer

PHPStorm with Nightwatch.js?

Is there a way to send nightwatch.js functional test reports into phpstorm? (I haven't found a selenium plugin, or anything else about this.)
inf3rno
  • 24,976
  • 11
  • 115
  • 197
0
votes
2 answers

NightwatchJS .waitForElementPresent abortOnFailure not working

I'm using NightwatchJS with NodeJS: http://nightwatchjs.org/api I have a modal dialog, which may or may not appear. It has a #close_button that needs to be clicked (if the modal does appear) to continue. I set the abortOnFailure parameter of…
Obay
  • 3,135
  • 15
  • 55
  • 78
-1
votes
1 answer

Previously-defined variable not working in other parts of test in nightwatchjs

I'm using nightwatchjs and the ssh2 npm package to test that a file name is present in a location, and asserting that it's correct. My code is as follows; var Client = require('ssh2'); var conn = new Client(); var…
Darren Harley
  • 75
  • 1
  • 18
-1
votes
1 answer

How do I assign a key value pair to an object array with a forEach loop in javascript nightwatch.js test automation script?

//I created a loop to append an index number [1-16] to the end of an xpath selector (these are selectors for li items on a website, they're all the same except the index number on the end.) Then I want to assign that selector to an existing object…
-1
votes
1 answer

How to setup Nightwatch.js with Symfony and VueJS?

I use Symfony 4 together with VueJS. In src/Controller I have HomeController.php which renders templates/home/index.html.twig. Inside this template I call the VueJS application: {% extends 'base.html.twig' %} {% block title %}My App{% endblock…
cezar
  • 11,616
  • 6
  • 48
  • 84
-1
votes
1 answer

Nightwatch.js - How to goes through multiple links and enter values without duplicating code?

I am trying to create a tool that enters assessment marks into a system. I currently have it working but the code is very repetitive. I have a JSON file with the student's marks. I then loop through the length of the data and enter the values into…