-
Notifications
You must be signed in to change notification settings - Fork 2.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
Explicit Wait functionality? #53
Comments
Here's a little example, I think this test sucks:
From what I can tell, the scenario is that on page load, there is a slight amount of time needed to make a connection to the pubsub server, but the test is already firing off messages (which don't get sent yet). I am waiting for responses come back from the server, but have noticed that they don't come through until about the 4th |
I confirmed that the problem is because the connection to the pubsub server doesn't finish initializing until about a second after page load. This test might be slightly better, please let me know if this is more appropriate or if there's a better way for protractor to handle this scenario.
|
Is there a way to tell if the pubsub is up and running more easily than clicking something and seeing what happens? You can use ptor.wait with any function, so if you do have ptor.wait(mycondition_to_continue_testing_fn());
var input = ptor.findElement(...) Maybe there is a variable that gets initiated in the browser or somthing? Could you test for the pubsub with Otherwise, using |
Closing as there seem to be no further questions - please reopen if something else comes up. |
"An explicit waits is code you define to wait for a certain condition to occur before proceeding further in the code." http://docs.seleniumhq.org/docs/04_webdriver_advanced.jsp#explicit-and-implicit-waits
Is it possible to do something like
ptor.until(mycondition_to_continue_testing)
?The text was updated successfully, but these errors were encountered: