While implementing AfterCommandExecuted browser event handler there is a difference between sender and EventsArgs :
private void ActiveBrowser_AfterCommandExecuted(object sender, ArtOfTest.WebAii.EventsArgs.BrowserCommandEventArgs e)
{
var browser = (Browser)sender;
//This returns true when there are frames in the browser
if (e.Command.HasFrames)
{
//This returns the frameInfo in String form for all frames in current browser.
Manager.Log.WriteLine("FrameInfo :" + e.Command.FramesInfo);
//At the same time the 'normal' browser returns a frameCount of zero
Manager.Log.WriteLine("FrameCount from browser:" + browser.Frames.Count);
}
}
e.Command.HasFrames returns true while browser.FramesCount returns 0
Steps to reproduce:
Download the attached project and run it. The implementation of the event handler is in the very first step.