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.
Exception in thread “main” org.openqa.selenium.UnhandledAlertException: Modal dialog present: Please select any option before selecting check All!
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
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++