Search code examples
c#seleniumwebdrivertime-wait

C# Webdriver code to wait


I have been all the day trying to make:

  1. Wait 10 seconds between two actions in webdriver

  2. Waiting long enough for the element to displayed (the id element) (because in Internet Explorer get the error "Unable to find element with id == signin-email"and i try to

But in C# (not in java) I only found this code:

driver.Manage().Window.Maximize();
driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10));
driver.FindElement(By.Id("signin-email")).Clear();
driver.FindElement(By.Id("signin-email")).SendKeys("blabla");

I does not get an error, BUT it does not wait any seconds. All the codes I could find to do this are for java not work to C#.

Please


Solution

  • If you want to wait only for ten seconds try Thread.Sleep(10000)