我正在使用selenium webdriver(用于Internet Explorer).它的作用基本上是在Internet Explorer中打开一个网页并进行表单提交.
我怎么能杀死在后台自动运行的internetexplorer.exe?
如果我想在成功执行数据库操作后使用commit(session),那么最好将它放在try或finally块中?在这里我最后使用它,它应该在尝试吗?
public void delete( --- ) {
Session session = init();
try {
----
} catch (HibernateException e) {
rollback(session);
logger.error("delete failed", e);
throw e;
} finally {
commit(session);
close(session);
}
}
Run Code Online (Sandbox Code Playgroud)