I've got a page that opens up a HTML popup window (not modal) containing a cancel button that closes it. If I set:
Manager.SetNewBrowserTracking(true)
before the popup is called then, as documented, I get a new Browser in the Browsers collection and the Manager.ActiveBrowser is set to the popup. However, when I call the cancel button to close the window (remembering to pass true to the HtmlInputButton.Click(true) so that it knows I'm closing the window) the Browsers collection remains the same (2) and the ActiveBrowser is still set to the closed popup. Subsequently the next command, in this case ActiveBrowser.RefreshDomTree() causes failure below.
The documentation states that when a popup window is closed the Browsers collection will be reduced and the ActiveBrowser will be set to the last browser, but this doesn't appear to happen. Is there something I'm missing here?
Cheers,
Matt
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_ad8cae06-40c6-448e-8654-f431fd539687',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')
InnerException: System.InvalidOperationException: This client 'Client_ad8cae06-40c6-448e-8654-f431fd539687' is not connected to remote to be able to process command.
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)