How to stop firefox ‘update failed’ dialog messing with your WebDriver automation
There I am, figuring out how to debug my FitNesse automation from within eclipse. And up pops the Firefox ‘update failed dialog’ and interfering with my automation.
A bane and a pain when using Selenium RC. But with WebDriver there are easy ways round this.
Start firefox with a profile and set the "app.update.silent" firefox property to true.
The update error will still happen, but at least firefox won’t try and tell your automated processes about it.
profile.setPreference("app.update.silent", true);
For more details visit http://kb.mozillazine.org/Category:Preferences
Oh, and the FitNesse in unit tests is http://fitnesse.org/FitNesse.UserGuide.RunningFromJunit
e.g.
@Test
public void runAFitNesseTest(){
JUnitHelper helper = new JUnitHelper("./fitnesse",
new File(System.getProperty("System.java.io.tmpdir"), "fitnesse").getAbsolutePath());
// type in the name of the test you want to debug here
String testName = "FitNesse.AcceptanceTestSuite.ATestCase";
try {
helper.assertTestPasses(testName);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}


[...] для скриптов, использующих WebDriver: как избежать диалога ‘update failed’ в [...]