This is closely related to my previous post
http://www.telerik.com/forums/cannot-launchnewbrowser-chrome-as-minimized-window but I decided to post it as a new thread since this is a separate issue and it may help others to search for it easier. I am trying to launch a new chrome window with the waitForBrowserToConnect = false but I am getting the following error:
InvalidOperationException - Sequence contains no elements
Here is some sample code. It should be noted that the following code works perfect without an error if you change the browser from Chrome to Internet Explorer:
Dim oSettings As Settings = New Settings()
oSettings.Web.DefaultBrowser = BrowserType.Chrome
Dim oManager As Manager = New Manager(oSettings)
oManager.Start()
Try
oManager.LaunchNewBrowser(oSettings.Web.DefaultBrowser, False)
Catch ex As Exception
MsgBox(ex.Message)
End Try
The only reason I am trying to do this is so that I don't have to wait a few seconds for the automation controls to "connect". This way I can use pinvoke to minimize the chrome window quickly so that I only see it for a split second, but I can't because it crashes my app! Please help!