Closed kretschmannj closed 3 years ago
Could be related: switching frames seems broken in a similar way.
→ Running command: frame (0)
Request POST /session/60E92292-FF5B-4621-BF7C-54C23D07BBD1/frame
{}
Response 404 POST /session/60E92292-FF5B-4621-BF7C-54C23D07BBD1/frame (2ms)
{
value: {
error: 'no such frame',
message: "Request body does not contain required parameter 'id'.",
stacktrace: ''
}
}
Error while running .switchToFrame() protocol action: Request body does not contain required parameter 'id'.
Safari 14 / Nightwatch 1.4.2
Can the priority be bumped up on this? Unless someone has a workaround, there is no way to switch windows in Safari. Again, the problem appears to be that Safari driver is expecting a 'name' parameter but Nightwatch is sending a 'handle' parameter.
@kretschmannj @ArpitLT works fine on local Safari 14 and Firefox.
@beatfactor Did you run the code snippet I included above? I just tried to run this code on Safari 14 and got this error ...
→ Running command: windowHandles ([Function])
→ Completed command: elements ('css selector', {name, __index, __selector, locateStrategy, pseudoSelector, parent, resolvedElement}, [Function]) (335ms)
Request GET http://hub.lambdatest.com /wd/hub/session/FBDC5A98-B7F6-4751-A6A2-DFCEF36956D7/window_handles
Response 404 GET http://hub.lambdatest.com/wd/hub/session/FBDC5A98-B7F6-4751-A6A2-DFCEF36956D7/window_handles (245ms)
{
value: {
error: 'unknown command',
message: "The command 'GET /session/FBDC5A98-B7F6-4751-A6A2-DFCEF36956D7/window_handles' was not found.",
stacktrace: ''
}
}
Error while running .getAllWindowHandles() protocol action: unknown command – The command 'GET /session/FBDC5A98-B7F6-4751-A6A2-DFCEF36956D7/window_handles' was not found.
{
status: -1,
code: '',
state: '',
value: {
error: 'unknown command',
message: "The command 'GET /session/FBDC5A98-B7F6-4751-A6A2-DFCEF36956D7/window_handles' was not found.",
stacktrace: ''
},
errorStatus: '',
error: "unknown command – The command 'GET /session/FBDC5A98-B7F6-4751-A6A2-DFCEF36956D7/window_handles' was not found.",
httpStatusCode: 404
}
→ Completed command: windowHandles ([Function]) (269ms)
@kretschmannj The windowHandles
command works fine on Safari and Firefox when run locally. You didn't make any mention that you're using as a cloud provider, as I can see from your log, and also didn't include any config (as it is required in the bug report template). This makes it quite difficult to identify the problem.
@beatfactor Good to know that you're able to test Safari locally. I'm on Windows and unfortunately don't have the ability to test Safari on my local machine, so we're running the test on the LambdaTest grid. Here's the nightwatch.conf.js ....
nightwatch_config = {
src_folders: ["tests"],
page_objects_path: ["framework/pages"],
custom_commands_path: ['custom_commands'],
custom_assertions_path: ['custom_assertions'],
test_settings: {
default: {
selenium_host: "hub.lambdatest.com",
selenium_port: 80,
username: 'kretschmannj',
access_key: '---------------------------------------------',
},
safari: {
desiredCapabilities: {
"platform" : "High Sierra",
"browserName" : "Safari",
"version" : "latest",
"resolution" : "1920x1080",
"safari.cookies" : true
}
}
}
}
module.exports = nightwatch_config
This issue has been automatically marked as stale because it has not had any recent activity. If possible, please retry using the latest Nightwatch version and update the issue with any relevant details. If no further activity occurs, it will be closed. Thank you for your contribution.
This issue has been fixed on the LambdaTest side by applying custom translations.
Could be related: switching frames seems broken in a similar way.
→ Running command: frame (0) Request POST /session/60E92292-FF5B-4621-BF7C-54C23D07BBD1/frame {} Response 404 POST /session/60E92292-FF5B-4621-BF7C-54C23D07BBD1/frame (2ms) { value: { error: 'no such frame', message: "Request body does not contain required parameter 'id'.", stacktrace: '' } } Error while running .switchToFrame() protocol action: Request body does not contain required parameter 'id'.
Safari 14 / Nightwatch 1.4.2
Did you get any solution for it? I am using saucelabs and chrome,FF,Edge works fine in selecting frame but in safari it fails
The switchWindow command is sending a 'handle' parameter rather than the expected 'name' parameter to the safari 'window' command. Here's the verbose output ...
Here's my code snippet ...
Safari version 11 Nightwatch version 1.4.2