2

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.

Yasir
  • 81
  • 1
  • 3
  • 20

1 Answers1

-1

I believe the second answer to this question is the answer you're looking for : How to check if an alert exists using WebDriver?

Community
  • 1
  • 1
SerkanC
  • 482
  • 4
  • 4
  • My question is no need to wait for alert and all...just i want to check whether any model dialog box is present or not while running the application.. Note:My question is Model dialog box not an alert.and model dialog is different and alert box is different. – DhivyaSubramani Mar 13 '13 at 06:48