I am trying to automate a application in which on switching from one page to another page execute command failed exception comes.
Switching happens when a button is clicked on home page using click() method which switches to another page of application.
Error generated is below
InnerException: System.IO.IOException: Pipe is broken.
at System.IO.Pipes.PipeStream.WinIOError(Int32 errorCode)
at System.IO.Pipes.PipeStream.WriteCore(Byte buffer, Int32 offset, Int32 count)
at System.IO.Pipes.PipeStream.Write(Byte buffer, Int32 offset, Int32 count)
at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.WriteCommandToPipe(PipeCommand command, PipeStream pipe, Boolean waitForDrain)
at ArtOfTest.WebAii.Messaging.Process.BrowserRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId)
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
After this exception the active browser becomes null
ActiveBrowser.IsConnected gives false and also Manager.ActiveBrowsers count is 0
Note:- When i run the test in debug mode and when i perform the click () operation the following exception is not received and ActiveBrowser.IsConnected comes true and after that test runs smoothly
I have applied Thread.Sleep(10000) before click on the button which takes me to next page and
also after clicking the button.