-
Notifications
You must be signed in to change notification settings - Fork 767
Wait until does not contain element
always waits for full amount of wait time
#1364
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
Comments
Wait until does not contain element
always waits for full amount of implicit wait timeWait until does not contain element
always waits for full amount of wait time
I agree that it is not very intuitive, but there is logical explanation. SeleniumLibrary supports two type of timeouts. There is Selenium API does not contain a method which would allow to ask that element is not in the page, in the Selenium API there is only way to ask that element is in the page. Now because you are waiting that element does not appear in the page, then Selenium will always wait the If only |
I am aware of these differences between # ...
lambda: self.find_element(locator, required=False) is None,
# ... But I can imagine this is not easily changed perhaps, because of the central role of the Okay, the most important thing to take away here is that you're saying this problem only occurs with the implicit wait, not with the Maybe this should at least be documented somewhere, preferably in the keyword documentation. |
1 Implementation The But I do not understand why you are surprised, could you tell more? What did you expect and why the line you see surprising? 2 timeout 3 documentation At least link in the: |
1. Implementation 3. Documentation Thanks :) |
1 Implementation 3 Documentation
But I am not sure which one would be better, need to give a some tough. Pointers and pull request are always welcomed. |
Ah yes, I like how your explanation takes into account both possible waiting parameters. That's crucial! Personally I would still find it to be clarifying if there's explicit mentioning of this counter-intuitive effect when using those But I think I stated my case. At the least I learned something, thanks for explanation. |
I've noticed similar behaviour for Alert Should Not Be Present - without timeout argument, it now wait the full time. This has changed since v4.4.0, and now the v5.1.3 implementatiton doesn't match the documentation for this keyword, in particular (section in bold):
|
I don't follow what are you saying. Could you explain your problem with an example, which shows the timeouts too? |
Leaving note for Review Milestone .. review the documentation issue @mcleanmds points out above .. |
Hello,
A colleague of mine stumbled upon this, and I found it to be worthy of creating an issue.
Let's say implicit wait is set to 20s, and suppose I want to wait for the disappearance of the element
iDontExist
:This will result in a full 20 seconds wait until it returns successfully. I inspected the code responsible, and indeed, it reflects the finding exactly:
In my opinion that is not intuitive. I would expect this keyword to return as soon as the element is not found. Maybe there's use cases for the current implementation also, in which case maybe a parameter can distinguish between both behaviors or something?
I just wanted to bring this to your attention and I'm curious to the clarification.
Thanks,
Bart
My environment:
Browser: Chrome 73.0.3683.86 (64 bits)
Browser driver: ChromeDriver version 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72)
Operating System: Windows 10 version 1703 (build 15063.1631)
Libraries
PS Judging by the implementation I would expect this to occur regardless of using implicit or explicit wait.
The text was updated successfully, but these errors were encountered: