Skip to content

WithMinimumWaitTimeoutOf #110

Open
Open

Description

@MehdiK

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!

Activity

  1. robdmoore commented on Sep 30, 2013

    @robdmoore
    Member

    But it is the minimum wait though - the max wait is what you specify in the method.

  2. MehdiK commented on Sep 30, 2013

    @MehdiK
    MemberAuthor

    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"/>.
    
  3. robdmoore commented on Sep 30, 2013

    @robdmoore
    Member

    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.

  4. MehdiK commented on Sep 30, 2013

    @MehdiK
    MemberAuthor

    Fair point!

    WithImplicitWaitOf?!

  5. robdmoore commented on Sep 30, 2013

    @robdmoore
    Member

    I was kind of deliberately avoiding implicit wait because I find that confusing.

    What about default wait?

  6. MehdiK commented on Sep 30, 2013

    @MehdiK
    MemberAuthor

    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:

    I was kind of deliberately avoiding implicit wait because I find that
    confusing.

    What about default wait?

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/110#issuecomment-25359839
    .

  7. robdmoore commented on Sep 30, 2013

    @robdmoore
    Member

    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."

  8. robdmoore commented on Dec 20, 2013

    @robdmoore
    Member

    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 give WithMinimumWaitOf as well as WithDefaultWaitOf?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions