WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Timeout when starting a session

Open yuqizhou77 opened this issue 3 years ago • 2 comments

Hi, I got an exception when launch an app saying OpenQA.Selenium.WebDriverException: Operation timed out. (Exception from HRESULT: 0x80131505).

at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) at OpenQA.Selenium.Appium.AppiumDriver1.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)

I launched the app using this way AppiumOptions options = new AppiumOptions(); options.AddAdditionalCapability("app", path); Session = new WindowsDriver<WindowsElement>(new Uri(ConfigConstants.WindowsApplicationDriverUrl), options)

This error does not always happen, so I am guessing this is probably due to slow performance sometime? May I know what the default timeout is and is there any way to reset this timeout? Or is there any better solutions for cases like this? Thanks!

yuqizhou77 avatar May 23 '22 15:05 yuqizhou77

The default time is 60 seconds.you can use ms experimental wait as capability but the maximum wait for that is 50 Seconds.

anunay1 avatar May 23 '22 20:05 anunay1

The default time is 60 seconds.you can use ms experimental wait as capability but the maximum wait for that is 50 Seconds.

For the 60 seconds timeout you mentioned above, do you mean the server will wait up to 60 seconds after sending the POST request to create a session before returning a response? What's the difference between this timeout and the ms experimental wait?

yuqizhou77 avatar May 24 '22 17:05 yuqizhou77