-
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
Chaning command issue #1863
Comments
The following code might work
|
Thank you @sandeepthukral but I pupously try to pause in the saveScreenshot call back since I am doing few things there that will require some access to nightwatch api For example:
|
@mezderman I'm not sure I understand the original question.
If I have understood correctly, that is an incorrect assumption. With the following code from your example: browser
.url(testPages.landing)
.waitForElementVisible('body')
.saveScreenshot(imgPath + '.png', function(data) {
browser.pause(20000)
})
.end() The order of execution should be
Is this not the case? |
Correct @aberonni . That's not the case for me. What I am really trying to do is something like that
|
I created a repo with simple implementation of what I am trying to do @aberonni @sandeepthukral : File: Thank you! |
@mezderman you need to understand the command queue. Read this page as many times as needed. For me the third time made this click When you put something in a callback, it happens in a different queue and in a different timeline. |
Ok, I had added some code from my understanding, but that code did not work when I forked your repo. So I edited my previous comment. I have some code that is working as expected. This is it
Here is the output of this code
The issue here is that this code works on nightwatch version 0.9.21 but not on 1.0.8 |
@sandeepthukral Thank you for your help! If you are not able to fork feel free to commit to master
|
This should be fixed in v1.0.11. |
I am trying to create a chain commands as follow:
The text was updated successfully, but these errors were encountered: