1,493 questions
0
votes
0
answers
25
views
How to reference a Nightwatch command script in test script?
In part of my Nightwatch.js command script (getImageDetails.js) I have the following code:
exports.command = async function() {
const specsAltText = await this.element('.specs-search-results__head-...
0
votes
0
answers
11
views
Finding css property is multiple elements
Aim
Using nightwatchjs version 3.4.1
Find the href of a number of elements with the same div
Get a css property of these elements
If the href from step 1 contains a # then the css property will a one ...
0
votes
0
answers
134
views
ChromeDriver 138 crashes/ECONNRESET waiting for URL change
I'm running some Nightwatch tests, on a headless browser, running in Docker, on Bitbucket, using the latest Chrome and Chromedriver (v138).
"devDependencies": {
"@percy/cli&...
3
votes
1
answer
106k
views
Error: function timed out, ensure the promise resolves within XXX, due to promises in SEQUENTIAL using reduce/Promise.resolve(nightwatch cucumber)
Nightwatch with Cucumber. I want to check if the elements listed in an Excel sheet are present on the webpage. To do this, a sequential promise(using reduce) is written to ensure that the page loads ...
0
votes
1
answer
87
views
How to allow a browser permission in NightWatch.js tests?
I'm using NightWatch.js to build e2e tests.
One of my tests requires to grant the Chrome browser's microphone permission.
When I run this test, I get a permission notification from the Chrome browser ...
1
vote
0
answers
84
views
How to bypass "Your connection is not private" in Nightwatch.js?
I'm trying to test a site on https://localhost with a self-signed certificate. I keep getting the "Your connection is not private" with the Advanced and Back to safety buttons followed by ...
0
votes
1
answer
70
views
Can't interact with browser pop-up with nightwatch.js
This is the last I've tried, but the problem is that once the popup is on the screen, I can't use the Console to get any of the selectors, I only see the html and body tags. PLEASE HELP!
module....
0
votes
0
answers
29
views
Cannot access page object models from referenced project
I have a project web.testing.dependent, which refers to the page object models from web.testing.referenced project.
web.testing.referenced project has been packaged and published to the local registry ...
0
votes
0
answers
16
views
Fix NighwatchJS Angular output wrapping incorrectly
I've installed Angular with ng new with all defaults, and then used ng e2e to scaffold NightwatchJS with all defaults. The tests run just fine now, but the output is unreadable on my Windows shells ...
0
votes
0
answers
69
views
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
<input placeholder="Systolic" type="...
0
votes
0
answers
16
views
Using javascript OR to assert element attribute values [duplicate]
I'm using nightwatchjs (version 1.7x) to run my tests.
One of my tests is to test that an attribute contains one of a possible 2 values.
In the html below;
<iframe id="google_ads_iframe_/...
0
votes
1
answer
71
views
How to get a collection of elements with Nightwatch .elemets()
I'm testing a website with Nightwatch and trying to get a collection of elements using the .elements() method.
I have the following code:
client.elements('css selector', 'p[class="f5 color-fg-...
1
vote
0
answers
486
views
WebDriver.io interceptor Error: TypeError: WebdriverAjax is not a function
hi try to launch my test with webdriver.io and interceptor service, this is my package.json
package.json
"name": "my-new-project",
"type": "module",
"...
1
vote
0
answers
363
views
spawn EACCES error with chromedriver when running Nightwatch.js tests via Jenkins
I am trying to run Nightwatch.js tests via Jenkins and I am getting this specific error:
Error: spawn chromedriver_win32/chromedriver.exe EACCES
This is my current Nightwatch.conf.js configuration:
...
0
votes
1
answer
153
views
Invalid testing environment specified: chrome
When run the this code got below error-
Invalid testing path
0
votes
1
answer
339
views
How to pass screenshot for the failed testcases to Report Portal. I am using Nightwatch for UI automation
Under the nightwatch.conf.js I have.
"screenshots": {
"enabled": true,
'on_failure': true,
'on_errors': true,
'path': 'tests_output/...
1
vote
0
answers
36
views
How to migrate to webdriver.io from nightwatch.js
My team is planning to migrate all the nightwatch.js code to webdriver.io.
Can someone please help me with the process.
0
votes
1
answer
72
views
Extracting part of element source using nightwatchjs
I'm currently using nightwatchjs to create my test scripts and have hit a stumbling block.
What I need to do it 'extract' a certain part of an element attribute, in order to use this value later on in ...
0
votes
0
answers
90
views
How to increase timeout for session If no new command reaches in Nightwatch 2.0
I have a wait command via API with opened browser and browser closed before condition is set true. How to increase timeout If no new command reaches and what is it name it?
e.g.
before(){
loginPage....
-3
votes
1
answer
168
views
[Nightwatch][selenium-server] Connection Refused! Is Selenium Server Started
I'm using nightwatch.js to test website, When running the google.js test which comes with Nightwatch I get the error back "Connection Refused is Selenium Server started?" and, well, it is. I ...
1
vote
1
answer
277
views
Nightwatch tests fail when running in docker using selenium/chromedriver
I am running my whole system using docker-compose and I am trying to execute my end-to-end tests (written with Nightwatch) using a selenium/chrome service that is in the same network. My frontend is ...
0
votes
1
answer
350
views
Custom commands or utility classes/functions?
I'm working with a team that has a project in Nightwatch.js. They are defining commands for almost everything:
Datetime functions as commands (return current day, array of days in a period, etc.)
SQL ...
0
votes
1
answer
143
views
NightwatchJs, wait for loop to gather array of element ids synchronously and continue
I need to gather an array of checkbox ids that sit inside an OL and then use that array of ids later to choose one at random, the problem i have is that because everything runs in the callbacks ...
1
vote
0
answers
107
views
Nightwatch JS | Getting Next Sibling Text
I am attempting to write a function that can acquire the text value of a nextSibling node underneath a label bracket. I need to be able to put that text into a global variable that I can reference ...
1
vote
1
answer
725
views
NightwatchJs is ignoring chrome options when trying to launch no sandbox and headless on docker
I am having an issue running nightwatch on a docker container using chrome, nightwatch seems to be completely ignoring the fact that i have told it to use --no-sandbox and --headless
My config for ...