Hello All,

I have a requirement where i need to wait for an element which is already
available in the form of variable IWebElement

Is there any way i can use WebDriverWait for IWebElement?

I am looking for something like mentioned below:

protected static void WaitForElement(IWebDriver driver, IWebElement
PageText)
         {
             WebDriverWait wait = new WebDriverWait(driver,
TimeSpan.FromSeconds(60)));
             *wait.Until(d=>PageText);*
* *//Currently this is not working
         }


Kartik Shah

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CADNy2Nw4VdTm631Z4B7HVsOaNKAhWir0xoWpFLKZFh8HgsAZaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Ashish Juyal at Sep 16, 2013 at 6:02 am
    Hi ,
               Try for FluentWait.

    Regards
    Ashish Juyal

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAKw4aj%2Bc4Rw8tZejJ0jao9qz%3D_KujGPjeo%3DtzxYq7HqhLFBK2g%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Kartik Shah at Sep 16, 2013 at 6:34 am
    Thanks Ashish. But it seems FluentWait is available only with Java and not
    with .NET bindings. I need this in c#.

    Any other pointers that i can try?

    Thanks,
    Kartik Shah

    Kartik Shah

    On Mon, Sep 16, 2013 at 11:32 AM, Ashish Juyal wrote:

    Hi ,
    Try for FluentWait.

    Regards
    Ashish Juyal

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/selenium-users/CAKw4aj%2Bc4Rw8tZejJ0jao9qz%3D_KujGPjeo%3DtzxYq7HqhLFBK2g%40mail.gmail.com
    .
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CADNy2NxfOnRmXBj2p6d%2BHCn2k%2B0gT_WJ99ZtGJ_M4Qg0gKVfyg%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jim Evans at Sep 16, 2013 at 9:57 am
    No, but there is a DefaultWait<T> in the .NET bindings that functions much the same as Java's FluentWait. That should give you the flexibility you need.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7122e6e7-da9b-4ac5-b322-34999344e5fd%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Kartik Shah at Sep 16, 2013 at 10:22 am
    Thanks Jim. That did worked for me.

    For someone who is looking something similar to implement, here is the code
    that i implemented based on Jim's suggesstion

    DefaultWait<IWebElement> w = new DefaultWait<IWebElement>(WebElement);
                     w.Timeout = TimeSpan.FromSeconds(30);
                     w.IgnoreExceptionTypes(typeof(NoSuchElementException));

                     return w.Until(ctx =>
                     {
                         var elem = WebElement;
                         if (elem.Displayed)
                             return elem;
                         else
                             return null;
                     });

    Kartik Shah

    On Mon, Sep 16, 2013 at 3:27 PM, Jim Evans wrote:

    No, but there is a DefaultWait<T> in the .NET bindings that functions much
    the same as Java's FluentWait. That should give you the flexibility you
    need.

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/selenium-users/7122e6e7-da9b-4ac5-b322-34999344e5fd%40googlegroups.com
    .
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CADNy2NwRJAckQcLxym_kTWZ8v9ienbz3uZx2cqrV5vXcWrqhqg%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedSep 13, '13 at 8:06p
activeSep 16, '13 at 10:22a
posts5
users3
websiteseleniumhq.org

People

Translate

site design / logo © 2022 Grokbase