I am using WatiN and I need to determine if an image has been loaded. In my case I get the red X on the page but when I use...
var image = WebBrowser.Current.Image(imageName);
if (!image.Exists)
{
Assert.Fail(string.Format("Could not find '{0}' image on the page", imageName));
}
...the Assert doesn't fail because the name of the image does exist on the page. BUT it is not loaded.
Is there a way to use WatiN to eval with JQuery or something that tells me when I get the red X? I have tried every method and property of WebBrowser.Current.Image to no avail.