Well, it depends on what the Modal Dialog was, but there are three things that I would check.
First you will most likely need to update your web driver
I noticed that you are using Webdriver 2.2.24 if you are also using FireFox as the browser that you want to upgrade WebDriver to 2.2.26 or higher. The change was made: “Prevent Firefox update, check and warning for extensions and plugins updates”, if any of these things happen, they will also raise a modal dialog.
Second one . It may be a dialogue raised on the site you are testing. javascript alert () or window.Prompt () are examples of modal dialogs that a site raises to do any number of things. You can use WebDriver to interact with these dialogs.
Third . If he didn’t get the screen capture of the Dialog dialog box, the dialog may not be the one you can access through the WebDriver API, so you need to write code to capture the entire screen (it should be easy with some search engines). Or you can record a video session when you run the code.
source share