Meta -
OS: Windows 10
Browser Version: geckodriver 0.11.1
Expected Behavior -
Element which was not found should return -> NoSuchElementException
Actual Behavior -
Element which was not found returned - WebDriverException
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://localhost:51897/session timed out after 35 seconds. ---> System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
--- End of inner exception stack trace ---
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary 2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxDriverService service
Steps to reproduce -
var test = WebDriver.FindElement(By.Id("testttete"));
Does anyone know if that was made per requirements?! (To throw WebDriver exception instead of NoSuchElementException)