How to handle https security warning in IE for Selenium WebDriver + RC & How to solve the Unhandled exception: Modal dialog present

12:53 AM 0 Comments







In Selenium Webdriver whenever we try to launch the IE we get the Security Warning pop-up.
Handling security warning pop-up can be done in two ways.

1. Using Robot Script as follows:
try {
        (new Robot()).keyPress(java.awt.event.KeyEvent.VK_ENTER);

         (new Robot()).keyRelease(java.awt.event.KeyEvent.VK_ENTER);
         } catch (AWTException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

2. Adding the website url in the Trusted websites
  1. Open Internet Explorer by clicking the Start button Picture of the Start button. In the search box, type Internet Explorer, and then, in the list of results, click Internet  Explorer.
  2. Navigate to the website that you want to add to a specific security zone.
  3. Click the Tools button, and then click Internet Options.
  4. Click the Security tab, and then click a security zone (Local intranetTrusted sites, or Restricted sites).
  5. Click Sites.
  6. If you clicked Local intranet in step 4, click Advanced.
  7. The website should be shown in the Add this website to the zone field. Click Add.
    If the site is not a secure site (HTTPS), clear the Require server verification (https:) for all sites in this zone check box.
  8. Click Close, and then click OK (or click OK twice if you clicked Local intranet in step 4).

Unknown

This site creates a platform to become an expert by gaining knowledge of unknown real-time issues as well.

0 comments: