public void switchToAlert() throws Exception {
RemoteWebDriver d = (RemoteWebDriver) driver;
By b = By.xpath("//UIAStaticText[@name='Secure Text Input']");
WebElement el = driver.findElement(b);
try {
d.switchTo().alert();
Assert.fail("should have thrown");
} catch (NoAlertPresentException e) {
// expected
}
el.click();