Wednesday, October 3, 2012

webdriver - modal dialog present

selenium webdriver modal dialog present

Recently we came across a situation where there is no modal dialog or alert, but selenium through "modal dialog present" exception, this issue occurred when there are multiple alerts in the same transaction.

Even the JavaScript executor is not working at this stage, I think Selenium team need to remove the "Modal Dialog Present" validation from the executor, so that when can proceed ahead by running code through JavaScript .

In order to overcome this situation we have used alert.dismiss(), so that selenium proceeded ahead without any exception.

---

9 comments:

  1. But if there were a bug which introduce an extra alert then you would miss it. Is this an example of too much of automation?

    ReplyDelete
    Replies
    1. In my case it has accepted the alert, but still selenium assume there is an alert, so I have used above code.
      I feel it is an issue with selenium not able to retrieve the latest page DOM, there are similar instance where element is visible, but it says not visible.

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. In sendemail.vbs you need to enter your outlook credentials, other wise it will generate a log statement in c:\seleniumresults\Merucrytours\timestamp with the error message.

      Delete
  3. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. No Outlook configuration required. Email is sent using CDO object, enter user name and password for outlook.

      Delete
    2. This comment has been removed by the author.

      Delete
  4. Hello Srinivas,
    This thread is pertaining to Modal dialog, why do you post the framework related comments here. Post your comments in the corresponding link, so that I will answer.

    ReplyDelete
  5. thanks bharath... actually i don't know where i need to start new thread ...i find this in your blog and posted some comments ... i think i should start new thread ..pls suggest me how to start new thread ...

    And i resolved SendEmail issue by changing my out look smtp server address and port number ..now it is working successfully....

    pls let me know...is there any option to delete all these unrelated comments in this thread ..

    thanks for your quick response and awesome support ....thanks once again...

    ReplyDelete