Hi All,

   When button is clicked alert pop up showed and closed at same time in
firefox. It dosen't wait for next step to execute.It shows error Modal
dialog present.


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/d9201363-1adf-401b-a8d1-22850426b204%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Praveenreddy narala at Sep 30, 2013 at 9:00 am
    Use this code..

    public void checkAlert() {
         try {
             WebDriverWait wait = new WebDriverWait(driver, 2);
             wait.until(ExpectedConditions.alertIsPresent());
             Alert alert = driver.switchTo().alert();
             alert.accept();
         } catch (NoAlertPresentException e) {
           ex.printStackTrace(); //exception handling
         }}


    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7eb12e80-9bcc-422c-81f1-1ca872343f90%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedSep 30, '13 at 7:18a
activeSep 30, '13 at 9:00a
posts2
users2
websiteseleniumhq.org

2 users in discussion

Ravi Kiran: 1 post Praveenreddy narala: 1 post

People

Translate

site design / logo © 2022 Grokbase