I want select the check box, one by one but it is throwing below error, I have used implecit wait command but still it is not working.

Suggest me on this.

I want select the check box, one by one but it is throwing below error, I have used implecit wait command but still it is not working.

Exception in thread “main” org.openqa.selenium.UnhandledAlertException: Modal dialog present: Please select any option before selecting check All!

Train Asked on September 10, 2014 in Selenium WebDriver.
Add Comment
  • 2 Answer(s)

    Hi Ravipatil,

    Are you getting any pop-up dialog while you are trying to do this operation.

    If so, you need to handle that first which is obvious and then do your operation.

    Thanks,
    Vishal S

    Doctor Answered on September 10, 2014.
    Add Comment

    Hi Ravi,

    As per the Exception some alerts are present in the URL after you select the check box, you need to handle those alerts and the try for check box selection
    int i=0;
    Alert alt = driver.switchTo.Alert();
    List<WebElements> checkBox = driver.findElements(By.id(“**”));
    for(each tb : checkBox)

    tb.get(i);i++;
    i++

    Train Answered on September 15, 2014.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.