title: FindElement() NOT working when application is getting triggered by task scheduler
body: <p>I have created a console application using VS 2017 Professional IDE using Selenium framework in C#. This is an automated application, opening an IE browser performing some operations, and closing the browser once all the operations are performed. We completed all positive and negative testing locally (running in debugging and without debugging mode on VS) and it is working as per the expectation. </p>
  
  <p>I need to configure the application in the task scheduler. In the task scheduler, inside ‘General’ Tab when I select ‘Run only when user is logged on’, I can see the console window is launching, which is subsequently launching the IE browser and performing the operations. In short it is working.</p>
  
  <p><a href="https://i.stack.imgur.com/Hk9hm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hk9hm.png" alt="Image 1"></a></p>
  
  <p>The problem is when I select the option ‘Run whether user is logged in or not’ inside ‘General’ tab, the application works in the background (I can’t see the console window and browser launching, but logs are getting generated.). The application is giving a timeout exception for below statements:</p>
  
  <blockquote>
    <p><strong>driver.FindElement(By.Id("FileUploadButtonControl")).SendKeys(path);     driver.FindElement(By.Id("ButtonName")).Click();</strong></p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/97TVs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/97TVs.png" alt="Image 2"></a> </p>
  
  <p>Nuget package I am using:</p>
  
  <ol>
  <li><p>Selenium.WebDriver v4.0.0</p></li>
  <li><p>Selenium.WebDriver.IEDriver v3.150.</p></li>
  </ol>
  
  <p>Browser - IE version 11</p>
  
  <p>Exception details:</p>
  
  <ol>
  <li><p>The HTTP request to the remote WebDriver server for URL <a href="http://localhost:63638/session/335b5515-69f8-4340-943d-ca06b1c991da/element/6c289ae0-e500-42dc-82bc-1b77590319eb/value" rel="nofollow noreferrer">http://localhost:63638/session/335b5515-69f8-4340-943d-ca06b1c991da/element/6c289ae0-e500-42dc-82bc-1b77590319eb/value</a> timed out after 120 seconds.-> getting exception for <strong>driver.FindElement(By.Id("FileUploadButtonControl")).SendKeys(path);</strong></p></li>
  <li><p>The HTTP request to the remote WebDriver server for URL <a href="http://localhost:62712/session/4a553643-2690-4984-b2ad-2d74c39e370c/window" rel="nofollow noreferrer">http://localhost:62712/session/4a553643-2690-4984-b2ad-2d74c39e370c/window</a> timed out after 120 seconds. -> getting exception for <strong>driver.FindElement(By.Id("ButtonName")).Click();</strong></p></li>
  </ol>
  
  <p>It would be extremely helpful if anybody could get us out of this tricky situation.</p>