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
0
votes
1 answer

Night watch pageobject element selectors are not working with @ notation

Selectors when passed using @ notation from the test function to the page object are not working. Here's my homepage object. module.exports = { url: function () { return this.api.launchUrl; }, elements: { …
Tajinder Singh
  • 205
  • 1
  • 5
  • 12
0
votes
0 answers

Nightwatch - set & get globals

Basically what I need to do is to get a config file from a csv file and load it as an array into a global variable each time I am running tests in before function. Lets say mynightwatch.conf.js contains following, example global variable…
Kropek
  • 31
  • 1
  • 1
  • 3
0
votes
1 answer

Set default timeout on a per test basis

I'm looking for a way to set the default timeout on a per-test basis. I'm writing some end to end tests in nightwatch. One of the tests requires hitting an API a few times to set up the initial test conditions. Its necessary to populate some user…
Adam Konieska
  • 2,805
  • 3
  • 14
  • 27
0
votes
1 answer

Nightwatch Cucumber is not finding my step definitions

Current behavior step definitions are not being recognized … no matter what I try, when I run nightwatch my features and steps come back as undefined. Expected/desired behavior The code in my step_definitions folder is…
Mark
  • 1
0
votes
1 answer

Is there a way to check for ellipsis on text using nightwatch?

Is there a way to check for ellipsis on text or text that has been truncated using nightwatch. I tried to use browser.assert.ok(ref.offsetWidth < ref.scrollWidth) but it seems like Nightwatch does not have attributes offsetWidth nor scrollWidth. Has…
K.U
  • 293
  • 1
  • 4
  • 15
0
votes
1 answer

chrome driver doesn't proceed http URLs except localhost

I'm using nightwatch.js, selenoid and chrome driver. I want browser to go to any url, that is not local e.g. browser.url('http://google.com'). But chrome driver doesn't proceed this request, however if I use https, everything works fine. I've tried…
Oddeone
  • 11
  • 2
0
votes
1 answer

Does waitForElementVisible not search for input elements?

I am using nightwatch.js to perform end-to-end testing and have to use a roundabout method for a waitForElementVisible command to work as expected. For example, my code below: browser.waitForElementVisible(".profile label[for='Admin']") //…
gkim795
  • 140
  • 1
  • 8
0
votes
0 answers

SyntaxError: Unexpected identifier running Nightwatch tests in Jenkins

Attached is an error I get when I attempt to run a jenkins job that runs a nightwatch script. It appears to have an issue with a function within the node modules. Desired behavior is for the job in jenkins to run successfully. The issue isn't with…
CMacMcMac
  • 1
  • 1
0
votes
1 answer

Nightwatch globals variable can't get on jenkins

Why the Nightwatch globals variable can't get on Jenkins? I added below in the nightwatch.js "globals_path": "global.js" And the test like this module.exports = { "@tags": ["jenkins"], "Test on jenkins": browser => { let TEST_ONE =…
0
votes
1 answer

Nightwatch if .waitforelement condition

I need some help with Nightwatch.js testing. Is there any way to make a .waitForElement if loop? got an app where i move some values between two storages ( randomly 1 >> 2 or 1 << 2) and than perform few more steps if a value is passed to next…
0
votes
1 answer

How to test redirection through navigation items in Nightwatch

without further do, I will cut to the chase: I have some anchor tags with iterated-item as a css class. All I want is to iterate through them, click them and test the redirected url of the browser. I have tried using elements but I get the stale…
Panos Vakalopoulos
  • 515
  • 1
  • 8
  • 23
0
votes
1 answer

Selecting date in calendars on Nightwatch

I'm trying to select a date on my calendar and Nightwatch can't seem to select it properly. What I'm trying to do is: document.querySelector("#calendario_inline > div > div > div > select.ui-datepicker-month") .click() .pause(100) …
0
votes
1 answer

ChromeOption "w3c" false - nightwatch js

I am new to the selenium world, I am starting to use nightwatchjs by following an online course. I had the issue for which I added a w3c : false to chrome options. I didn't exactly understand what is the issue and why I have to turn off the w3c to…
Adayach
  • 23
  • 2
0
votes
3 answers

Having trouble selecting checkboxes

The checkbox on my page looks like this:
disconnectedLynx
  • 101
  • 1
  • 11
0
votes
1 answer

IE11 nightwatch browser stack end-2-end test against basic auth url fails with timeout

Anyone knows how to make that work? See screenshot. IE11 opens the damn basic auth promt although the credentials are passed in the url: $ npm run test:browserstack:ie11 -- --mode integration --url…
fr00t
  • 681
  • 1
  • 4
  • 19
1 2 3
8 9