Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 06:46
    gravityvi commented #2967
  • 06:46
    gravityvi commented #2967
  • 06:44
    gravityvi commented #2967
  • 06:44
    gravityvi commented #2967
  • May 25 09:41
    garg3133 synchronize #3208
  • May 25 09:41
    garg3133 synchronize #3208
  • May 25 09:35
    garg3133 synchronize #3208
  • May 25 09:35
    garg3133 synchronize #3208
  • May 25 09:29
    garg3133 synchronize #3208
  • May 25 09:29
    garg3133 synchronize #3208
  • May 24 19:53
    RezhaBlue commented #2967
  • May 24 19:53
    RezhaBlue commented #2967
  • May 24 19:41
    garg3133 synchronize #3208
  • May 24 19:41
    garg3133 synchronize #3208
  • May 24 19:38
    garg3133 synchronize #3208
  • May 24 19:38
    garg3133 synchronize #3208
  • May 24 10:41
    garg3133 synchronize #3208
  • May 24 10:41
    garg3133 synchronize #3208
  • May 24 10:36
    garg3133 opened #3208
  • May 24 10:36
    garg3133 opened #3208
vdokkupalle-ebsco
@vdokkupalle-ebsco

Hi.. I am using nightwatch API as a node service. I found that over the time, the memory is keep increasing. When I profiled the node app, I see the results are not being cleared from memory and all the loaded scenarios as modules are in memory in the form of strings. Is there a way to unload the scenario when a test is completed?

Also is there a way to store the results as JSON file.. I am using the reporter callback in globals to get the results and saving it as JSON. But when there are many tests, the results object is huge and it is crashing the server when saving it to file system (Probably during stringify. I am using BFJ library to stringify the object asynchronously). Any ideas to reduce the report size?

Thanks

Ravi Sawlani
@gravityvi
hey @vdokkupalle-ebsco, by Nightwatch API are you referring to the nightwatch-api node package?
vdokkupalle-ebsco
@vdokkupalle-ebsco
Hi @gravityvi , It's Nightwatch Cli Runner
Ravi Sawlani
@gravityvi
oh okay, will look into this
Omar Gonzalez
@s9tpepper
√ Expected element <.component-article-topic-breadcrumbs .single-category> text to equal: "DESIGN"
Is there a way to disable this output from the expect API calls?
Vaibhav Singh
@vaibhavsingh97
@s9tpepper you can add detailed_output to false in Nightwatch config, this will not show detailed assertion output
vdokkupalle-ebsco
@vdokkupalle-ebsco
@gravityvi Hi, did you get any chance to look into it?
Ravi Sawlani
@gravityvi
Hey @vdokkupalle-ebsco, can you provide me some more details about your test setup I am not able to recreate the issue.
KirbsP
@KirbsP
Hi is there any reason my output for my nightwatch html is all green even failed ones are showing as failed and are ticked in the report. Despite saying failed. Im not sure where I should be putting the options I want to run as the documentation isn't clear on where to put it
Ravi Sawlani
@gravityvi
Hey @KirbsP can you share your nightwatch config? and what kind of options you want to use?
KirbsP
@KirbsP

var HtmlReporter = require('nightwatch-html-reporter');
/ Same options as when using the built in nightwatch reporter option /
var reporter = new HtmlReporter({
openBrowser: true,
reportsDirectory: __dirname + '/reports/'
});

module.exports = {
write : function(results, options, done) {
reporter.fn(results, done);
}
};

THis is what I run. So I either want to run default or compact
nightwatch --tag accessible --default --reporter ./html-reporter.js
Ravi Sawlani
@gravityvi
@KirbsP can you also share the command where this is happening, what line is causing this type of discrepancies?
KirbsP
@KirbsP
It runs the test
one sec ill see if I can screenshot the output
Screenshot 2021-08-03 at 13.55.26.png
@gravityvi Thats a snippet of the html output
KirbsP
@KirbsP
My issue is it's all showing green
Even the style.css file shows it shouldnt.
Ravi Sawlani
@gravityvi
I guess this issue is related to the reporter you are using.
KirbsP
@KirbsP
im using the nightwatch html reporterso youre saying it has an issue?
Ravi Sawlani
@gravityvi
yes, this reporter is not maintained by nightwatch-team
KirbsP
@KirbsP
ok cheers
KirbsP
@KirbsP
So I've used a different kind of reporting tool as opposed to the above and I still get the same issue
The code is literally copied and pasted
https://www.npmjs.com/package/nightwatch-html-reporter If someone has time it would be good to see if you see the same issue as I do with this then for my own sanity
Dharin Shah
@Dharin-shah
@KirbsP can we move this to github discussions to track the thread easily ?
Akash Gupta
@akash-gupta-146
Hello,
Is there any way to allow/block microphone permission prompted by browser (Chrome)
Vaibhav Singh
@vaibhavsingh97
hi @akash-gupta-146 , you can use --use-fake-ui-for-media-stream to skip those security checks
image.png
vdokkupalle-ebsco
@vdokkupalle-ebsco

Hi.. I am using nightwatch CliRunner in a nodejs as a service. I am trying to enable the parallel testing by setting
test_workers: {
enabled: true,
workers: "auto"
},
After adding these two, I am getting the message "Started child process for: xxxx.spec.js", but it is failing soon afterwards with error "Address already in use ::: 8081" This address is actually the address of the nodejs server. So is it trying to run the server again?

Is there a way to run the tests in parallel when using this in nodejs server instead of cli tool?

vdokkupalle-ebsco
@vdokkupalle-ebsco
I understand that nightwatch creates child processes and runs the node command again with some additional args. My requirement is I am running these tests as part of a nodejs server. If I enable the test_workers, the child processes are running the command to start the server and it is failing. I am using CLIRunner inside nodejs server to run the tests. Is there a way to run tests parallelly in this scenario using saucelabs? Can we run multiple CLIRunner instances passing single file to each of these instance? Can someone please help in figuring this out?
Andrei Rusu
@beatfactor
@vdokkupalle-ebsco sorry for the delay here, we were busy with getting the v2 alpha released
so what you're trying to do is to use Nightwatch programatically and use the parallel feature? That might not work, but I'd like to see a more complete example. Another way of handling it is to start your nodejs server from nightwatch, as part of the global hook.
Victoria0214
@Victoria0214
Ravi Sawlani
@gravityvi
Hey @Victoria0214, can you try returning a promise from callback function of peform command
Ravi Sawlani
@gravityvi
Hi all, Nightwatch v2-alpha.3 is published in NPM. It has a tight integration with Cucumber. There is also a repository with examples, boilerplate, and a lot of predefined cucumber steps: https://github.com/gravityvi/cucumber-nightwatch-boilerplate
Victoria0214
@Victoria0214
Hi all!
I have a test and fail message
buildPlanPage.assert.containsText('@activeButton','Gravity Only')
Testing if element <Element [name=@activeButton]> contains text 'Gravity Only' in 5000ms - expected "contains text 'Gravity Only'" but got: "does not contain 'Gravity Only'"
Is it possible somehow to have message like
expected "contains text 'Gravity Only'" but got: "real text that element has" ?
radu
@RaduBuciuceanu
Hey guys. If I use the --suiteRetries option, my github action runs forever (it sais passed successfully but does not exit). I run it using the following command:
xvfb-run --auto-servernum --server-args='-screen 0, 1920x1080x24' yarn test -e local --suiteRetries 3 --verbose. Did any of you ever meet this problem?
radu
@RaduBuciuceanu
Update for the above question. Same thing happens on local when running: yarn test -e local --suiteRetries 3.
And one more update. I downgraded nightwatch to v1.7 and all works good. It seems to be a bug in the v2.
1 reply
some_body
@some_body:matrix.org
[m]
Hello - Thank you very much for nightwatchjs. Been using for a few months and enjoying. Just came to a requirement that a test simulate various network connectivity conditions, including no connectivity for X seconds. Familiar with how to do this with puppeteer, and webdriver.io - is there a way that this community recommends proceeding with nightwatchjs?
some_body
@some_body:matrix.org
[m]
hey @Victoria0214, IIUC, you should be able to use .containsText with a custom message via the optional msg parameter - https://nightwatchjs.org/api/#assert-containsText.
John Degey
@johndegey
Hello all, I'm new to nightwatch... i use the alpha.4. I try to launch chrome with an unpacked extension or firefox with a packed extension in zip format. For chrome, I try with the "arg: ['--load-extension=/path/to/my/extension/code']" in the conf file but it does not work (similar config works with puppeter or php-webdriver). For Firefox, I'm trying to use firefox.installAddon... but I must do something wrong and I could not find an example... Could someone points me to the right direction ? Thx
Ravi Sawlani
@gravityvi
Hey @johndegey, could you share your nightwatch config file
John Degey
@johndegey

Hello @gravityvi, I start with the auto-generated one so I put only the chrome part :

chrome: {
desiredCapabilities : {
browserName : 'chrome',
'goog:chromeOptions' : {
// More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
//
// This tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)
w3c: true,
args: [
'--load-extension=/home/john/Dev/Liberty/libertyGC'
]
}
},
webdriver: {
start_process: true,
server_path: '',
cli_args: [
// --verbose
]
}
},

I try w3c: false/true... does not matter