title: How to Run Selenium UI tests in azure pipeline for c#. OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL
body: <p>I am trying to run selenium UI tests through vsts release pipeline usingVisual Studio Test tasks from vsts release. My tests are getting recognized but not getting executed. getting same error for all tests.</p>
  
  <p>I have tried updating the chrome drive used the old chrome driver still no luck. Initially I was using the chromedrive.exe file in my sln but then I removed that and add a nuget reference form Selenium.Chrome.Webdriver 2.45. tests are running fine on my local machine but when I deploy on vsts agent server I am getting an error</p>
  
  <p>this the error I am getting in my VsTest log</p>
  
  <pre><code>Starting ChromeDriver 2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387) on port 4620
  Only local connections are allowed.
  Failed   _MenuConfirmation
  Error Message:
   OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://localhost:4580/session/1315de45cb967b450b25cef659f6/window/current/size timed out after 60 seconds.
  ----&gt; System.Net.WebException : The operation has timed out
  Stack Trace:
  at 
  OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
  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.RemoteWindow.set_Size(Size value)
  at abc.AutomatedTests.BaseTestingClass.CommonInit() in D:\teams\build4\_work\1\s\src\abc.AutomatedTests\BaseTestingClass.cs:line 43
  --WebException
  at System.Net.HttpWebRequest.GetResponse()
  at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)   
  </code></pre>
  
  <p>In my basetestingclass.cs I have code to launch the browser and set its size.</p>
  
  <pre><code>[SetUp]
  public void CommonInit()
      {
          driver = new SeleniumDriver (browser).getdriver();
          driver.Navigate().GoToUrl(url);
          driver.Manage().Window.Size = new Size { Width = 1920, Height = 1080 };
          //driver.Manage().Window.Maximize();
      }
  </code></pre>
  
  <p>In my prior tries I was getting same error for Maximize() code.</p>
  
  <p>This is was added in mu csproj after the nuget addition </p>
  
  <pre><code> &lt;Import Project="..\packages\Selenium.Chrome.WebDriver.2.45\build\Selenium.Chrome.WebDriver.targets" Condition="Exists('..\packages\Selenium.Chrome.WebDriver.2.45\build\Selenium.Chrome.WebDriver.targets')" /&gt;
  </code></pre>
  
  <p>and this in packages.</p>
  
  <pre><code>&lt;package id="Selenium.Chrome.WebDriver" version="2.45" targetFramework="net452" /&gt;
  </code></pre>
  
  <p>I want to Run the selenium tests In my VSTS pipeline using the Visual Studio Test. Also I have Visual Studio Test Platform Installer task prior to test execution task in my pipeline and my tests are getting recognized successfully.</p>
  
  <p>I tried most of the available solution but still the same error. hence asking again.</p>