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

goto patch not compatible with waitForSelectors... #1

Open
observerss opened this issue Sep 28, 2012 · 7 comments
Open

goto patch not compatible with waitForSelectors... #1

observerss opened this issue Sep 28, 2012 · 7 comments

Comments

@observerss
Copy link

I haven't digging too much but it seems if I add waitForSelector before label, it won't work at all

@observerss
Copy link
Author

I am able to work around this problem by move the callback out of waitForSelector

casper.waitForSelector('.xx');
casper.then(function(){/* ... */});

otherwise, only first waitForSelector will work.

@Satevg
Copy link

Satevg commented Mar 6, 2014

Yes, very necessary waitForSelector() function doesn't work...

@jacquescrocker
Copy link

any resolution to this? is there a better workaround now in 1.1?

@lourenc
Copy link

lourenc commented Jan 8, 2015

Is there any solutions for that?

@nickbash11
Copy link

This is very very need function!

@r0manchak
Copy link

I had the same problem. You can find workaround here: #4
Check out my fork: https://github.com/MrQwert/casperjs-goto for full code.

@gitthemessage
Copy link

Thanks for your update.
There is still something that is broken.

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 loop addition it no longer waits until the page has loaded, it opens the page and immediately executes the sub function.

eg casper.thenOpen('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

7 participants