Skip to content

OpenQA.Selenium.WebDriverException The HTTP request to the remote WebDriver server for URL timed out after 60 seconds. #1976

@shyampatadia

Description

@shyampatadia

Hello guys, I recently started using WinAppDriver, I am facing a issue of timeout exception, whenever trying to find a certain element.

I am using WinAppDriver with Specflow, Appium and Selenium.

Now In the scenario "A", the driver is able to find the element of the Search bar present in the task bar of Windows 11. Now when I run the same thing in scenario "B", it gives me the exception that I mentioned. The element is same, the workflow is same, everything is same only that the scenario is different, and I am using hooks so the specflow hooks are also the same. Can anyone help me out if you have faced a similar issue?

Below is the Stack of the exception:

OpenQA.Selenium.WebDriverException The HTTP request to the remote WebDriver server for URL http://127.0.0.1:4723/session/94514B13-90D8-4D25-B6F2-4656280AC515/element timed out after 60 seconds. at OpenQA.Selenium.Appium.Service.AppiumCommandExecutor.Execute(Command commandToExecute) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value)
at OpenQA.Selenium.Appium.AppiumDriver1.FindElement(String by, String value) at OpenQA.Selenium.Appium.AppiumDriver1.FindElementByAccessibilityId(String selector)
`

Below is the log from the Console of the WinAppDriver.exe:
`
POST /session/94514B13-90D8-4D25-B6F2-4656280AC515/element HTTP/1.1
Accept: application/json, image/png
Connection: Keep-Alive
Content-Length: 33
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723
traceparent: 00-891dadc9e7372967c7686d3a170c1518-678ffb6acf2376ff-00
User-Agent: selenium/3.141.0 (.net windows)

{"using":"name","value":"Search"}
`

Below are the versions of the Nugget packages in the project:
<PackageReference Include="Appium.WebDriver" Version="4.1.1" /> <PackageReference Include="Selenium.Support" Version="3.141.0" /> <PackageReference Include="Selenium.WebDriver" Version="3.141.0" /> <PackageReference Include="SpecFlow" Version="3.4.8" /> <PackageReference Include="SpecFlow.xUnit" Version="3.4.8" />

Below is the code for the driver initialization:
Process.Start(@winappDriverExecutablePath); AppiumOptions appiumOptions = new AppiumOptions(); appiumOptions.AddAdditionalCapability("app", "Root"); _deskTopDriver = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), appiumOptions);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions