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

thanks for your thoughts. #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

thanks for your thoughts. #25

wants to merge 1 commit into from

Conversation

jubishop
Copy link

@jubishop jubishop commented Aug 2, 2011

add then() to accompany and(). then() takes it's callback and enqueues it to guarantee that it will execute in order immediately after whatever the last selenium call was queued and immediately before the next one.

there are some cases where the combination of and() (which fires immediately) and inline callbacks (which fire after success on any individual selenium call) aren't adequate.

when trying to gain an access token for a facebook user, you get redirected to a url with the access token in the url's path. i want to be able to arbitrarily execute code once that access token has been gathered, but i want to still queue up my other selenium queries without having to wait for that callback to fire..

in my basic tests where i call a browser.waitFor*, then a browser.then(function(..)), followed by another browser.open(...) or whatever, the then seems to fire at the right moment, only after the waitFor is completed, and before the open() begins...

…s it to guarantee that it will execute in order immediately after whatever the last selenium call was queued and immediately before the next one.

there are some cases where the combination of and() (which fires immediately) and inline callbacks (which fire after success on any individual selenium call) aren't adequate.

when trying to gain an access token for a facebook user, you get redirected to a url with the access token in the url's path.  i want to be able to arbitrarily execute code once that access token has been gathered, but i want to still queue up my other selenium queries without having to wait for that callback to fire..

in my basic tests where i call a browser.waitFor*, then a browser.then(function(..)), followed by another browser.open(...) or whatever, the then seems to fire at the right moment, only after the waitFor is completed, and before the open() begins...
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

Successfully merging this pull request may close these issues.

1 participant