Closed rike422 closed 5 years ago
You left out your config and nightwatch version.
@beatfactor
sorry. I forgot to add.
nightwatch version: 1.2.2 nightwatch.json
{
"src_folders": [
'target file'
],
"output_folder": "reports/e2e",
"custom_commands_path": "./node_modules/nightwatch-xhr/es5/commands",
"custom_assertions_path": "",
"page_objects_path": "",
"globals_path": "",
"selenium": {
"start_process": true,
"server_path": "./node_modules/selenium-server-standalone-jar/jar/selenium-server-standalone-3.141.59.jar",
"log_path": "",
"host": "127.0.0.1",
"port": 4444,
"cli_args": {
"marionette": true,
"webdriver.chrome.driver": "node_modules/chromedriver/bin/chromedriver",
"webdriver.ie.driver": "",
"webdriver.gecko.driver": "node_modules/geckodriver/geckodriver"
}
},
"test_settings": {
"default": {
"launch_url": "http://localhost",
"selenium_port": 4444,
"selenium_host": "localhost",
"silent": true,
"marionette": true,
"webdriver.gecko.driver": "node_modules/geckodriver/geckodriver",
"webdriver.firefox.profile": "webdriver",
"screenshots": {
"enabled": false,
"path": ""
},
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true
}
},
"chrome": {
"webdriver": {
"port": 9515,
"default_path_prefix": "",
"server_path": "node_modules/chromedriver/bin/chromedriver",
"cli_args": [
"--verbose"
]
},
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true
}
}
}
}
I tried to delete custom_commands_path
but it was the same error
Do you specifically need the Selenium server? You can change the config like here: https://github.com/nightwatchjs/nightwatch-website-tests/blob/master/nightwatch.conf.js
For now, you can try to update the chrome capabilities:
chrome: {
desiredCapabilities : {
browserName : 'chrome',
chromeOptions: {
w3c: false
}
}
}
@beatfactor
Thank you for your quick response.
As an integration test, I am testing with browserstack. nightwatch.json is merged to nightwatch.json for browserstack and tested, so it exists as a base setting. I wrote this json for a long time, so the above is memorable...
For now, you can try to update the chrome capabilities:
It seems to have been solved. Thanks for the advice!
Describe the bug
I encountered the following error when writing a test using getAttribute.
After examining it, I think that there is a problem with the following processing.
https://github.com/nightwatchjs/nightwatch/blob/master/lib/element/command.js#L203
GetAttribute expects a string, but executeProtocolAction it passes an object. https://github.com/nightwatchjs/nightwatch/blob/master/lib/api/element-commands/getAttribute.js#L18
I tried changing it as follows and the test worked correctly
How To Reproduce
So far in my environment, it happens in all tests using getAttribute.
Your Environment:
Please include the following:
Additional context
Add any other context about the problem here.