@vikramarka This we tried with nightwatch execution will generate a html report. But we are looking for generating the html report with nightwatchjs_exporter as shown below. We cannot add such argument --reporter html-reporter.js in nightwatchjs_exporter. we can get only failed snapshots not html reportes
./nightwatchjs_exporter -n /home/opc/nightwatch/node_modules/nightwatch/bin/nightwatch -t /home/opc/nightwatch/node_modules/nightwatch/bin/ --delay=10
containsText
is not correct command for that.
getValue
requires a callback method too so it's better to use assert.value
directly
Hi. I'm trying to run my nightwatch tests on headless firefox, but can't get it to work. My config includes
firefox: {
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled : true,
acceptSslCerts: true,
acceptInsecureCerts: true,
firefoxOptions: {
w3c: false,
headless: true,
args: [
'--enable-features=NetworkService,NetworkServiceInProcess',
'--ignore-certificate-errors',
'--disable-web-security',
'--window-size=1920,1080',
'--disable-extensions',
'--start-maximized',
'--disable-dev-shm-usage',
'disable-infobars',
'disable-notifications',
'--log-level=3',
'--headless'],
prefs: {
any ideas what I'm doing wrong? Thanks.
describe
thing. you can set unit_tests_mode:true
in your nightwatch config and you are ready go. Below is the simple example of it. For more information on unit test cases you can refer this. Hope it helps 😃const add = require('./add');
const assert = require('assert');
describe('Adding two numbers',function (){
it('adding two numbers',function(){
const sum = add(2,3);
assert.strictEqual(sum,5);
})
})
hey @gravityvi, my application renders in <canvas> so I cannot interact with it via DOM elements. So my idea was to create global object on window
, eg. e2e holding methods eg.e2e: {
doSmth()
}
that method under the hoods can call the backend endpoint or whatever. I'm trying to have tests looking like
client
.url("http://localhost:5000/")
.makePlayerDie('playerName')
.pause(2000) // wait for backend to perform
.checkIfPlayerIsDead('playerName')
.respawnPlayer('playerName')
.checkIfPlayerIsAlive('playerName')
.end()
this makePlayerDie
, checkIfPlayerIsDead
, respawnPlayer
, checkIfPlayerIsAlive
are methods available in
window.e2e global
but I don't know how to access this global from the nightwatch
browser.url("https://user:pass@hostname.com");
won't work for Safari.Safari in MacOS does not support basic authentication by passing the username and password in URL. Unfortunately, currently we do not have any workaround to solve this problem.
Hi.
I've just installed the latest Nightwatch (npm node package) version 1.7.7 and the way I run my tests is no longer working.
If I run my tests on a group basis:
npx nightwatch -c config/local.conf.js -e chrome --g carInsurance
it works ok.
However, if I run them on a tag basis:
npx nightwatch -c config/local.conf.js -e chrome --t carInsuranceTest
it runs all of my tests, not just the tests with the carInsuranceTest tag.
Has the way you run tests using tags changed in the latest Nightwatch version (my tests worked Ok in my previous nightwatch version, which was 0.9.21)?
Any help would be greatly appreciated. Thanks.