There is a demo on the Masked Input Plugin author's site
http://digitalbush.com/projects/masked-input-plugin/
The following code offers a workaround by dropping to Selenium
emulation. There are bound to be other workarounds that would achieve
the same results. SendKeys did not put the date 01/01/1970 into the
date box, but the type, followed by blank sendKeys triggered enough of
the events to get the input into the box.
@Test
public void maskedInputPlugin(){
WebDriver fdriver = new FirefoxDriver();
fdriver.get("
http://digitalbush.com/projects/masked-input-plugin/");
fdriver.findElement(By.id("tabs")).findElement(By.linkText("Demo")).click();
// following does not trigger plugin code
//driver.findElement(By.id("date")).sendKeys("01011970");
// workaround
Selenium selenium = new WebDriverBackedSelenium(fdriver,"");
selenium.type("date", "01011970");
fdriver.findElement(By.id("date")).sendKeys("");
}
Hope that helps,
Alan