title: How to handle IE security alert pop up in Selenium
body: <p>I am getting "Alert data: When you send information to the Internet, it might be possible for others to see that information. Do you want to continue?" while running the login script. I am able to capture the security alert data but not able to accept that alert and proceed further.</p>
  
  <pre><code>@Test
    public void f() 
    {
      driver.get("http://www.demo.guru99.com/V4/");  
      String title= driver.getTitle();
      System.out.println(title);
          WebElement element = driver.findElement(By.xpath("html/body/form/table/tbody/tr[1]/td[2]/input"));
          element.sendKeys("mngr57377");
          WebElement element1 = driver.findElement(By.xpath("html/body/form/table/tbody/tr[2]/td[2]/input"));
          element1.sendKeys("yzUdAtu");
          WebElement elementClick=driver.findElement(By.xpath("html/body/form/table/tbody/tr[3]/td[2]/input[1]"));
          elementClick.click();
          try {
              click(elementClick);
          } catch (UnhandledAlertException f) {
              try {
                  Alert alert = driver.switchTo().alert();
                  alert.accept();
                  String alertText = alert.getText();
                  System.out.println("Alert data: " + alertText);
  
              } catch (NoAlertPresentException e) {
                  e.printStackTrace();
              }
          }
  
    }
  </code></pre>