-1

I have a dropdown which is hidden at the moment it loads and with a button click it is set to visible and I can see it when the selenium is running it in the browser but still it gives me this exception

org.openqa.selenium.WebDriverException: ElementNotVisibleError: Element is not currently visible and may not be manipulated'ElementNotVisibleError: Element is not currently visible and may not be manipulated' when calling method: [wdIMouse::click] Command duration or timeout: 47 milliseconds

Can someone suggest how we can resolve this?

asked Oct 1, 2015 at 19:17
4
  • Looks like this thread may be helpful: stackoverflow.com/questions/22110282/… Commented Oct 1, 2015 at 19:25
  • Before trying Adam's suggestion I'ld verify that you are giving the selection enough time to appear. You could quickly throw a Thread.sleep(3000) in there and if that resolves the problem, fix it properly with something like the answer for stackoverflow.com/questions/32890596/… Commented Oct 1, 2015 at 19:29
  • Adam and EGHM I have tried both the approach but nothing works. I tried selecting by visible text but still doesn't work. Commented Oct 2, 2015 at 21:00
  • Please read the guide How do I ask a good question, especially the part on Minimal, Complete, and Verifiable example (MCVE). This will help you solve problems for yourself. If you do this and are still stuck you can come back and post your MCVE, what you tried, and what the results were so we can better help you. Commented Oct 5, 2015 at 0:43

1 Answer 1

-1

Try using Actions and WebDriverWait

Maybe something like this

Actions builder = new Actions(driver);
WebDriverWait wait = new WebDriverWait(driver);
Action clickTheDropDown = builder.moveToElement(dd).Click(otherElement).build();
clickTheDropDown.perform();
wait.Until(Expectedcondition.VisibilityOfElement(dd);
answered Oct 3, 2015 at 10:16

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.