-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
element() and elements() on section return different results #2573
Comments
In an attempt to fix this I looked through the code and found this test: nightwatch/test/src/element/testPageObjectElementSelectors.js Lines 116 to 140 in fbd021e
Looking at line 128 and 135 it seems that this is actually desired. Sry but I don't understand why the result of |
Well, in the first case, the response of the .element() command is unprocessed whereas in the second case, it is processed because the command has context. |
Thanks for the answer but it is not really satisfying... I still think that the difference in the "result" objects is very much unexpected... Btw this was not the case with 1.2.4. (which I'm currently trying to upgrade from, unfortunately the products test base is large and therefore upgrading got a lot harder...) |
Describe the bug
The result of
element(...)
orelements(...)
calls in sections are wrapped in an additional "result" object.For example the result of an
element
call inside a test:The result of an
element
call in a section:Sample test
tests/elements.js
pages/home.js
Run with command
Verbose output
debug.log
Configuration
nightwatch.conf.js
Your Environment
nightwatch --version
npm --version
node --version
The text was updated successfully, but these errors were encountered: