Closed liunate closed 5 years ago
PR #2048 is sent to correct the behavior.
I'm having the same issue after update to 1.0.19 version
Thanks @liunate. For now I'm installing Nightwatch NPM with git+https://github.com/nightwatchjs/nightwatch.git#612ae4b4388e1221704b2e3908547c0178bdc5ec to have this fix where I'm testing upgrading my tests to use Nightwatch 1.x.x. Hopefully it will be merged and included in a build soon.
What the issue is
Either
.frame()
or.frame(undefined)
or.frame(null)
is supposed to switch browser context to default top-level one but receivesmissing 'id'
orno such frame
error with or without selenium server.The line https://github.com/nightwatchjs/nightwatch/blob/848b1347ad7a84263d93c40223c9f7a40530a5ee/lib/transport/jsonwire/actions.js#L154 should
POST
with{ id: null }
in request body given either.frame
arguments listed above per W3C spec https://www.w3.org/TR/webdriver/#switch-to-frame:Simple test showing the issue:
Repo https://github.com/liunate/nightwatch-issue-frame-missing-id
Nightwatch Config
Test Case
Verbose nightwatch output
versions
nightwatch 1.0.19 chrome=72.0.3626.121 chromedriver=2.46.628411 (3324f4c8be9ff2f70a05a30ebc72ffb013e1a71e),platform=Mac OS X 10.14.1 x86_64) macOS Majove 10.14.1 (18B75) Node v8.11.2 Selenium not used