Closed nicholaswmin closed 6 years ago
Continuing...
I'm not a WebDriver expert in any way (this is my first time working with the stuff) but..
If you add a handle
parameter instead of name
when POST
ing, it works.
For example:
In nightwatch protocol.js
:
function postRequest(path, data, callback) {
// @NOTE Ridiculous monkey patch just for testing
if (data.name) {
data = Object.assign(data, {
handle: data.name
})
}
// End of ridiculous monkey patch
if (arguments.length === 2 && typeof data === 'function') {
callback = data;
data = '';
}
var options = {
path : '/session/' + Nightwatch.sessionId + path,
method : 'POST',
data : data || ''
};
return sendRequest(options, function(result) {
if (/\/element$/.test(options.path) && result.value) {
result.value = validateElementEntry(result.value);
} else if (/\/elements$/.test(options.path) && Array.isArray(result.value)) {
result.value = result.value.map(function(entry) {
return validateElementEntry(entry);
});
}
if (typeof callback === 'function') {
callback.call(this, result);
}
});
}
Having the same issue here. More or less same setup as @nicholaswmin
This is my system configuration:
I'm not sure whether the following issue could be related: https://github.com/SeleniumHQ/selenium/issues/5064
Unless I'm missing the purpose of this project, you seem to be closing issues and jumping to conclusions rather prematurely. I'm not sure why. Opening and tracking these issues helps your project.
I've included a snippet above that illustrates how this can be fixed in this project. I can issue a PR if you want me to.
It is still an issue with
geckodriver v0.19.1 selenium-3.10.0 Firefox v59.0
Having same issue as above - Firefox can't switchWindow()
This is an issue in FF 62 and it is a blocker for us to be unable to extend our night watch test suite to run in FF...After investing so much time into nightwatch, I hate to see this basic functionality not compatible with one of the major browsers.
Just curious if anybody has any workarounds that work for them considering that https://github.com/dstepper/selenium/commit/2da01059bc3853f0d2a936a0bff18bd344d3aa95#diff-578329ec7273c4a024979fd0ebcda293 is not merged?
P.S. going round in circles here because @beatfactor closed this issue blaming it to be gecko specific but gecko shuttles us back to nightwatch: https://github.com/SeleniumHQ/selenium/issues/5831#issuecomment-384789011 What is next?
@kiran-ghe I'm sorry to hear about your frustration, but this issue should be fixed in the latest nightwatch version, v1.0.11. Could you please try upgrading?
Thanks @beatfactor we tried to use the Nightwatch version you mentioned but we can't even get the framework to launch, we get this error; it works fine in the current version 0.9.21: Error reading external global file using "./environments/index" Error: Cannot find module '/Users/michaeljk/workspace/nightwatchproject/configs/environments/index' at Function.Module._resolveFilename (module.js:527:15) at Function.Module._load (module.js:476:23) at Module.require (module.js:568:17) at require (internal/module.js:11:18)
@kiran-ghe would you mind sharing your nightwatch.json config?
@kiran-ghe please open a different ticket and include the above error and your config, if you don't mind.
switchWindow
doesn't seem to work in Firefox 57. Although no errors are thrown/logged, the browser never switches focus to the passed window.Steps to reproduce
switchWindow
.Expected behaviour
Actual behaviour
The browser never focuses to Tab 2, even after adding an extended
pause()
to make sure the tab has opened and loaded.MCVE
Logs
Running the above MCVE with
--verbose
shows aPOST 500 Error
when attempting toswitchWindow
Notes
System Configuration
Nightwatch
--env
configuration