I have a problem at Selenium code which is that when I run code with a breakpoint it works well, without a breakpoint I get an exception...
this is the code:
IWebElement myField4 = driver.FindElement(By.Name("login_1method"));
myField4.Click();
IWebElement myField5 = driver.FindElement(By.CssSelector("body > div.content-wrapper.landing-page > div:nth-child(2) > div:nth-child(1) > article > section > ul > li:nth-child(1) > a"));
myField5.Click();
The code gives an error at myfield5
without a breakpoint but works if it pauses at a breakpoint on the first line.
The error
NoSuchElementException was unhandled