I can able to activate the drop down and able to select the value from it sometimes but sometimes i can't able to select the option for the drop down and i am facing an timeout error.



Error: Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with Command duration or timeout: 35 milliseconds


Edit: updated reply to reflect the question better.

With this code, Selenium selects the value in the dropdown. Possibly important: the value is visible (no scrolling needed) when the list is shown. But I'm using the same index as you, so that should make no difference.

Beware, I'm not sure which demo page you used, I picked this one: http://demos.telerik.com/kendo-ui/dropdownlist/remotedatasource

            IWebDriver d = new FirefoxDriver();
            WebDriverWait w = new WebDriverWait(d, new TimeSpan(0, 0, 10));


            w.Until(driver => Boolean.Equals("false", d.FindElement(By.CssSelector("#products_listbox")).GetAttribute("aria-hidden")));
  • am using kendo ui dropdown, so the same class name is used by more than 1 element, for you information i have provided the url which is similar to my project "demos.kendoui.com/web/dropdownlist/index.html" and tell me what kind of wait i have to use.. with example..please ;) Feb 12 '15 at 10:00
  • Like I said, try replacing your wait with an explicit wait for the visibility of the element. You might find these replies interesting: stackoverflow.com/questions/10941184/…
    – FDM
    Feb 12 '15 at 11:00
  • But still the time out error exist...;( Feb 12 '15 at 13:43
  • Timeout on the wait, or on the click after it? Perhaps you should post the relevant HTML section as well.
    – FDM
    Feb 12 '15 at 17:23
  • timeout on the cluck..u can find the relevant html code in the url "demos.kendoui.com/web/dropdownlist/index.html"; Feb 13 '15 at 5:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.