Skip to content

Instantly share code, notes, and snippets.

@shuji
Created November 18, 2013 13:14
Show Gist options
  • Save shuji/7527525 to your computer and use it in GitHub Desktop.
Save shuji/7527525 to your computer and use it in GitHub Desktop.
SeleniumFailedCapture
public class SeleniumFailedCapture implements TestRule {
@Override
public Statement apply(final Statement base, Description description) {
return new Statement() {
@Override
public void evaluate() throws Throwable {
try {
base.evaluate();
} catch (SeleniumException e) {
handleException(e);
}
}
};
}
protected void handleException(SeleniumException e) {
// TODO 失敗した時の処理
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment