You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this only me or this should be WithMaximumWaitTimeoutOf as in wait for maximum of 10 seconds before you timeout? Or perhaps we could rename it to WithMaximumWaitOf as I think that Timeout makes it sound a bit weird!
WithMinimumWaitTimeoutOf sets implicit/global wait on the web driver instance which works exactly like the wait we set on Finder and Assertion methods. The only difference is that the maxWait passed to methods overrides the global wait for that particular method.
If you set WithMinimumWaitTimeoutOf to 40 seconds, the element location still returns instantly if the element(s) exists on the page. If it doesn't exist it waits for up to 40 seconds for the element to appear.
The method documentation says:
/// When searching for a single element, the driver should poll the page
/// until the element has been found, or this timeout expires before throwing
/// a <see cref="T:OpenQA.Selenium.NoSuchElementException"/>.
The problem is that if the max wait you specify is smaller than the implicit wait it still waits for the implicit wait. That's why I named it minimum because from that point of view it is the minimum.
Sounds good. I honestly find the current method name and its xml comments
confusing: "Specify the minimum amount of time in seconds to wait when trying to find elements on the page."
Let's use something like "Specify the default amount of time to wait before timing out when searching for elements. Note: if you specify a maxWait for a particular method call it can't make the wait smaller than the value you specify here."
Also, should we also change all the instances that use TimeSpan.FromSeconds(3) in the individual methods (e.g. Find.Element(...) when no timeout is specified as well as the implicit timeout? Unless we give WithMinimumWaitOf as well as WithDefaultWaitOf?
Activity
robdmoore commentedon Sep 30, 2013
But it is the minimum wait though - the max wait is what you specify in the method.
MehdiK commentedon Sep 30, 2013
WithMinimumWaitTimeoutOfsets implicit/global wait on the web driver instance which works exactly like the wait we set on Finder and Assertion methods. The only difference is that the maxWait passed to methods overrides the global wait for that particular method.If you set
WithMinimumWaitTimeoutOfto 40 seconds, the element location still returns instantly if the element(s) exists on the page. If it doesn't exist it waits for up to 40 seconds for the element to appear.The method documentation says:
robdmoore commentedon Sep 30, 2013
The problem is that if the max wait you specify is smaller than the implicit wait it still waits for the implicit wait. That's why I named it minimum because from that point of view it is the minimum.
MehdiK commentedon Sep 30, 2013
Fair point!
WithImplicitWaitOf?!robdmoore commentedon Sep 30, 2013
I was kind of deliberately avoiding implicit wait because I find that confusing.
What about default wait?
MehdiK commentedon Sep 30, 2013
Sounds good. I honestly find the current method name and its xml comments
confusing:
"Specify the minimum amount of time in seconds to wait when trying to find elements on the page."On Mon, Sep 30, 2013 at 4:48 PM, Robert Moore notifications@github.comwrote:
robdmoore commentedon Sep 30, 2013
Yeah, in retrospect I agree.
Let's use something like "Specify the default amount of time to wait before timing out when searching for elements. Note: if you specify a maxWait for a particular method call it can't make the wait smaller than the value you specify here."
robdmoore commentedon Dec 20, 2013
So, should we rename it
WithDefaultWaitOf?Also, should we also change all the instances that use
TimeSpan.FromSeconds(3)in the individual methods (e.g.Find.Element(...)when no timeout is specified as well as the implicit timeout? Unless we giveWithMinimumWaitOfas well asWithDefaultWaitOf?