Skip to content
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

breaks thenOpen #5

Open
gitthemessage opened this issue Nov 22, 2018 · 0 comments
Open

breaks thenOpen #5

gitthemessage opened this issue Nov 22, 2018 · 0 comments

Comments

@gitthemessage
Copy link

Thanks for the loop and label work.
There is something that it breaks.

I have used thenOpen in a lot of my work. When using this you can open a page and then it waits until it has loaded and then runs an included sub function.
However, with the addition of the new checkStep and then functions it no longer waits until the page has loaded, it opens the page and immediately executes the sub function.

eg casper.thenOpen('https://www.yahoo.com/', function () {this.capture('screenshot.png');})

The screenshot executes immediately without waiting for the page to load, thus resulting in an empty screenshot.

I know I can use something such as a waitFor function to wait for the page to be loaded but there are some things where thenOpen is much more appropriate and accurate.

Is there anyway to fix this so that thenOpen behaves as it should?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant