nightwatch: Errors when working with Firefox against selenium hub (only)
NW version: 1.1.14 Node version: v10.16.0 NPM version: 6.9.0 Firefox Version: 67.0 Gecko Driver: 0.24.0 Selenium Hub Version: 3.141.59
The errors not occurs when working directly against selenium node but only when working against selenium hub
you can see the first error when trying to navigate to url when the navigation results value is null (while in chrome the results are as expected see below code):
"simple test against selenium hub" : function(browser) {
browser.url("https://nightwatchjs.org/", function(results){
console.log("Nav Results: " + JSON.stringify(results));
})
}
// Nav Results: {"value":null} - firefox
// Nav Results: {"sessionId":"6b6a3b345d1a8206583e30eaa5e8b54b","status":0,"value":null} - chrome
here is the verbose log:
Request POST http://myhub:4444 /wd/hub/session
{ desiredCapabilities: { browserName: ‘firefox’, acceptSslCerts: true, platform: ‘ANY’, javascriptEnabled: true, acceptInsecureCerts: true, elementScrollBehavior: 1, name: ‘my test’ } } Response 200 POST http://myhub:4444/wd/hub/session (2910ms) { value: { sessionId: ‘541f6274-0025-4352-a06d-efc96608e8c5’, capabilities: { acceptInsecureCerts: true, browserName: ‘firefox’, browserVersion: ‘67.0.4’, ‘moz:accessibilityChecks’: false, ‘moz:buildID’: ‘20190619235627’, ‘moz:geckodriverVersion’: ‘0.24.0’, ‘moz:headless’: false, ‘moz:processID’: 1948, ‘moz:profile’: ‘C:\Users\qa\AppData\Local\Temp\rust_mozprofile.2Wz4QHdbjotc’, ‘moz:shutdownTimeout’: 60000, ‘moz:useNonSpecCompliantPointerOrigin’: false, ‘moz:webdriverClick’: true, pageLoadStrategy: ‘normal’, platformName: ‘windows’, platformVersion: ‘6.1’,
rotatable: false, setWindowRect: true, strictFileInteractability: false, timeouts: { implicit: 0, pageLoad: 300000, script: 30000 }, unhandledPromptBehavior: ‘dismiss and notify’, ‘webdriver.remote.sessionid’: ‘541f6274-0025-4352-a06d-efc96608e8c5’ } } } Received session with ID: 541f6274-0025-4352-a06d-efc96608e8c5
Another example is when try to execute js: - here i’m getting 'execute did not match a known command’ error
"simple test against selenium hub (js)" : function(browser) {
browser.url("https://nightwatchjs.org/", function(results){
console.log("Nav Results: " + JSON.stringify(results));
});
browser.execute(function(){
console.log("browser log test")
},[],function(results) {
console.log("execute results: " + JSON.stringify(results))
})
}
// execute results: {"status":-1,"state":"","value":{"error":[],"message":"POST /session/be23eed8-73a2-40a2-bb21-8e4cf1b99966/execute did not match a known command"},"errorStatus":"","error":"POST /session/be23eed8-73a2-40a2-bb21-8e4cf1b99966/execute did not match a known command","httpStatusCode":404}
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (2 by maintainers)
ok. this bug happens to me without selenium. only on firefox (FF) . chrome works perfectly: here is my test
this is with NightWatch 1.1.13 . no selenium server. just WebDriver. geckodriver 0.24.0 ( 2019-01-28) Firefox 60.7.2esr (64-bit) on RHEL v7.6
should I open a dedicated defect for this ?