public void VerifyImagePresentOrNot()
{
IWebElement ImageFile = driver.FindElementByXPath("//*[@class ='android.widget.Image' and @index= '0']");
Boolean ImagePresent = (Boolean)((IJavaScriptExecutor)driver).ExecuteScript("return arguments[0].complete && typeof arguments[0].naturalWidth != \"undefined\" && arguments[0].naturalWidth > 0", ImageFile);
if (!ImagePresent)
{
Console.Write("Image not displayed.");
Console.ReadLine();
}
else
{
Console.Write("Image displayed.");
Console.ReadLine();
}
}
{
IWebElement ImageFile = driver.FindElementByXPath("//*[@class ='android.widget.Image' and @index= '0']");
Boolean ImagePresent = (Boolean)((IJavaScriptExecutor)driver).ExecuteScript("return arguments[0].complete && typeof arguments[0].naturalWidth != \"undefined\" && arguments[0].naturalWidth > 0", ImageFile);
if (!ImagePresent)
{
Console.Write("Image not displayed.");
Console.ReadLine();
}
else
{
Console.Write("Image displayed.");
Console.ReadLine();
}
}