Is there anyway to check whether an model dialog box is present in Selenium web driver? I am using the following code:
public boolean isAlertPresent()
{
try
{
driver.switchTo().alert();
robotClass();
System.out.println("Model dialog is present");
return true;
}
catch (NoAlertPresentException Ex)
{
System.out.println("Model dialog is not present");
return false;
}
}
This code is working fine for checking whether alert dialog box is present or not. And I want to check whether model dialog box is present or not in selenium using java. Please help me out to fix this issue.