Skip to content

JavaScript confirm popup  #130

@nebaris

Description

@nebaris

Hi,
If I add an JavaScript confirm popup to an anchor element, I get this exception when I run the test method:

OpenQA.Selenium.UnhandledAlertException: Modal dialog present

How do I handle this popup?
Thank you.

Activity

robdmoore

robdmoore commented on Dec 16, 2013

@robdmoore
Member

Hi,

You should be able to follow the advice set out here: http://stackoverflow.com/questions/10093604/how-to-click-javascript-confirm-dialogue-box-with-selenium-webdriver-in-c-sharp

To get to the web driver you just need the Browser property inside your page object.

I'll leave this issue open so we can add in an abstraction within Seleno to avoid the need to dive into the Selenium driver.

nebaris

nebaris commented on Dec 17, 2013

@nebaris
Author

Thank you! That solved my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @robdmoore@nebaris

        Issue actions

          JavaScript confirm popup · Issue #130 · TestStack/TestStack.Seleno