I am taking the screenshot of this screen:
but everytime it gives me the following exception:
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://localhost:49644/session/bc1237c6e7484d4c9686555254d3ec70/screenshot timed out after 60 seconds. ---> System.Net.WebException: The request was aborted: The operation has timed out. at System.Net.HttpWebRequest.GetResponse() at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo) --- End of inner exception 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.RemoteWebDriver.GetScreenshot() at specflowPjt.Hooks.TakeScreenshot()
I am getting the above exception at AddScreenshot() method of selenium.
The code i am using works fine everywhere, but giving exception only at this place. May someone please tell me what could be possible reasons behind this & finally how to take the screenshot of this screen.
Few pointers that may help you resolving this:
The screen which I am trying to capture is in loading state. (can we capture the screen which is in the loading state?)
My website is very slow.
I am working on remote machine.
Any help would be greatly regarded. Thanks