-
Notifications
You must be signed in to change notification settings - Fork 73
-
Notifications
You must be signed in to change notification settings - Fork 73
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
require('nightwatch-cucumber').client
's keys are hidden
#322
Comments
Thanks for reporting this. I think the issue here that the client is not yet ready after
statement. Can you retry the consoles within step definitions? The client should be ready at that moment. Basically this problem is the main case I introduced the Proxy. |
I just tried inside the callback of the |
As I understand, the client proxy should implement function getClientProxy (subPages) {
return new Proxy({}, {
+ ownKeys (target) {
+ return Object.getOwnPropertyNames(runner.nightwatchApi.getClientApi())
+ },
// ...
})
} |
Thanks @anatoliyarkhipov for the tip! Will add this |
I'm submitting a ... (check one with "x")
Current behavior
My setup is very similar to the demo.
Logging the client object yields these results.
So the properties are there, they are just invisible when you don't know their names. My guess is that it's caused by a
Proxy
with anownKeys
trap wrapping the actualclient
.Expected/desired behavior
Logging or listing the keys of
client
should yield the same results as they would on theclient
that nigtwatch provides. Not doing so is confusing and make implementing nightwatch-cucumber harder for the user.Reproduction of the problem
See current behavior.
What is the motivation / use case for changing the behavior?
Bugfixing.
Please tell us about your environment:
In case of a bug report please provide the following information:
npm ls nightwatch cucumber nightwatch-cucumber && node --version
--verbose
flagThe text was updated successfully, but these errors were encountered: