Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 25 22:14
    AutomatedTester synchronize #2995
  • Jan 25 22:14
    AutomatedTester synchronize #2995
  • Jan 25 22:14

    AutomatedTester on checkresponse_deprecation

    Update mock URLs to match W3C e… (compare)

  • Jan 25 22:14

    AutomatedTester on checkresponse_deprecation

    Update mock URLs to match W3C e… (compare)

  • Jan 25 18:50
    AutomatedTester synchronize #2995
  • Jan 25 18:50
    AutomatedTester synchronize #2995
  • Jan 25 18:50

    AutomatedTester on checkresponse_deprecation

    Move to throwDecodedError as ch… update to selenium 4.1.1 Update mock URLs to match W3C e… and 1 more (compare)

  • Jan 25 18:50

    AutomatedTester on checkresponse_deprecation

    Move to throwDecodedError as ch… update to selenium 4.1.1 Update mock URLs to match W3C e… and 1 more (compare)

  • Jan 25 12:24

    beatfactor on main

    added discord badge (compare)

  • Jan 25 12:24

    beatfactor on main

    added discord badge (compare)

  • Jan 25 09:55
    garg3133 opened #146
  • Jan 24 17:33
    harshit-bs assigned #2980
  • Jan 24 17:33
    harshit-bs assigned #2980
  • Jan 23 20:40
    NorseGaud closed #143
  • Jan 23 16:46
    aakash3771 edited #2984
  • Jan 23 16:46
    aakash3771 edited #2984
  • Jan 22 21:10

    beatfactor on main

    2.0.0-dev.15 removed some test output (compare)

  • Jan 22 21:10

    beatfactor on main

    2.0.0-dev.15 removed some test output (compare)

  • Jan 22 19:17

    beatfactor on main

    fixed an issue with creating th… (compare)

  • Jan 22 19:17

    beatfactor on main

    fixed an issue with creating th… (compare)

KirbsP
@KirbsP
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
John Degey
@johndegey
For Firefox, they don't have any command line argument to embed an unpack or packed web-extension, I never succeed to installed my extension, neither with php-webdriver or puppeeter, seems Mozilla is stuck in previous century....
1 reply
So when I read the news on the blog saying that new alpha implements something like browser.installAddon, I give it a try full of hope ;)
but it lacks of exemple and I'm a bit lost on how to code this
Elior Cohen
@eliorcohen
Hey, I'm trying to figure out the expected behaviour for "abortOnAssertionFailure" when using Async/Await.
when i'm using ES6 Async Await and calling "waitForElementVisible" if the element is not found, the test continue to execute, the function is not throwing an Error to stop the test.
if i'm using the regular syntax browser.waitForElementVisible(selector, timeout); it work as expected, fails the test and skip the other ones
when using await browser.waitForElementVisible(selector, timeout); the test continue and ignore the flag of 'abortOnAssertionFailure'
the test will still fail, but will continue to run until it's done. and it's not my intention
Ravi Sawlani
@gravityvi
@johndegey try using capabilities like this:
const chrome = require('selenium-webdriver/chrome');
const capabilities = new chrome.Options();
capabilities.addExtention(<file-path>)

module.exports = {
  test_settings: {
    chrome: {
      capabilities,
      webdriver: {
        start_process: true,
        server_path: require('chromedriver').path,
        cli_args: [
          // --verbose
        ]
      }
    }
  }
};
@eliorcohen seems to me like a bug could raise an issue regarding this on github?
Elior Cohen
@eliorcohen
@gravityvi just found some old bug that may be related (i guess that waitForVisible using the assert functionality) - nightwatchjs/nightwatch#2535 , it's a year old and still open
3 replies
i't trying a simple solution wo wrap the command and handle the async result
function waitForElementVisible(selector, timeout = 1500) {
  return new Promise((resolve, reject) => {
    console.log(`elementIsVisible:${selector}`);
    b.waitForElementVisible(selector, timeout, (data) => {
      if (data.status === -1) reject(data.result.error);
      resolve();
    })
  });
}
this is something that seems to be built-in the engine, it's check for ES6 and Async in the _watFor and such and can throw this error instead of returning a valid result for status inspection
John Degey
@johndegey
@gravityvi Hi, nothing seems to work, (type => capabilities.addExtensions), I delete the config file and regenerate it again and try simple change : can't even start in headless mode or maximized... no options are reflected in the command line use . If I use the logged command line from chromedriver.log, add --load-extension=/my/path/to/ext/folder --start-maximized, everything works fine. Also, the autogenerated file use the entry "goo:chromeOptions" in chrome.desiredCapabilities and use "chromeOptions" in 'selenium.chrome'.desiredCapabilities, this is confusing...
I try to set chrome binary but it is always using the same version, the 'chromeOptions - binary' does not work
could be great to have a complete conf file with all options as an example
John Degey
@johndegey
I give a try to the last v1, it is even worst than the v2 alpha... can't even start a chrome browser, it always start geckodriver... but use chromedriver.log as log file.... strange to see Marionnette Info for chrome...
Andrei Rusu
@beatfactor
you seem to be having a hard time there
I'm pretty confident Nightwatch is able to start a chrome browser by now...