title: Unable to handle Windows 10 pop-ups using Robot class
body: <p>I am trying to run the below code in Internet Explorer, Windows 10.</p>
  
  <p>----------------------------Test---------------public class SampleTest {</p>
  
  <pre><code>public static void main(String args[]) throws AWTException, InterruptedException{
      System.setProperty("webdriver.ie.driver", "path//IEDriverServer.exe");
      WebDriver driver = new InternetExplorerDriver();
      driver.get("url");
      HelperMethods.validateSplash();
  }
  </code></pre>
  
  <p>}`
  --------------------HelperMethods-----------</p>
  
  <p>`
  public class HelperMethods {</p>
  
  <pre><code>public static void validateSplash() throws AWTException, InterruptedException{
      HelperMethods.ctrlV("username");
      HelperMethods.pressTab();
      Thread.sleep(2000);
      HelperMethods.ctrlV("password");
      HelperMethods.pressEnter();
  }
  
  private static void ctrlV(String stringToPaste) throws AWTException{
      Robot robot = new Robot();
      StringSelection strToPaste = new StringSelection(stringToPaste);
      Toolkit.getDefaultToolkit().getSystemClipboard().setContents(strToPaste, null);            
      robot.keyPress(KeyEvent.VK_CONTROL);
      robot.keyPress(KeyEvent.VK_V);
      robot.keyRelease(KeyEvent.VK_V);
      robot.keyRelease(KeyEvent.VK_CONTROL);
  }
  
  private static void pressTab() throws AWTException{
      Robot robot = new Robot();
      robot.keyPress(KeyEvent.VK_TAB);
      robot.keyRelease(KeyEvent.VK_TAB);
  }
  
  private static void pressEnter() throws AWTException{
      Robot robot = new Robot();
      robot.keyPress(KeyEvent.VK_ENTER);
      robot.keyRelease(KeyEvent.VK_ENTER);
  }
  </code></pre>
  
  <p>}`</p>
  
  <p>When I try to run the above script in Windows 7(Desktop), it is working fine. But when I try to run the same in Windows 10(laptop), it is not working.</p>
  
  <p>Can someone please help. Thanks</p>