Command chaining doesn't work in async functions #2557
Unanswered
kretschmannj
asked this question in
Help Needed
Replies: 1 comment
-
If I remember well you need to return browser (this) object in each function to make chaining working. Please anyone correct me if I am wrong. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to call an async page object command in my Nightwatch test but the test is failing. As you can see by the code sample, I'm attempting to chain a couple of .pause commands together but the chaining mechanism is not working. If I remove the 'async' keywords and comment out the 'await' code then the chained commands work. So it seems that using 'async' breaks command chaining. Is there a workaround for this?
Nightwatch test ...
page object file ...
output ...
Nightwatch v 1.5.0
Beta Was this translation helpful? Give feedback.
All reactions