use of net.heartsome.cat.ts.test.ui.dialogs.DatabaseManagementDialog in project translationstudio8 by heartsome.
the class DBManagement method selectDB.
/**
* 完整流程:选择库;
* @param dbName
* 要选择的数据库名称,其他信息直接从 Excel 中读取
*/
public void selectDB(String dbName) {
mode = DatabaseManagementDialog.SELECT;
getDataConnect(mode);
dialog = new DatabaseManagementDialog(DatabaseManagementDialog.SELECT);
dialog.activate();
getDBListFromServer(true);
assertTrue("数据库名称:" + dbName + ",实际内容:" + table.cell(0, 1), isExist(dbName));
table.unselect();
table.select(table.rowIndexOfColumn(dbName, TsUIConstants.getString("tblColDatabaseName")));
dialog.btnOK().click();
Waits.shellClosed(dialog);
}
use of net.heartsome.cat.ts.test.ui.dialogs.DatabaseManagementDialog in project translationstudio8 by heartsome.
the class DBManagement method openDBMgmgDialog.
// 以下为非完整步骤
/**
* @param from
* 入口,请使用 TSUIConstants 类中提供的枚举。
* @return 打开的库管理对话框;
*/
public DatabaseManagementDialog openDBMgmgDialog(Entry from) {
if (from.equals(TsUIConstants.Entry.MENU)) {
ts.menuDBManagement().click();
} else if (from.equals(TsUIConstants.Entry.SHORTCUT)) {
try {
ts.pressShortcut(SWTBotUtils.getCtrlOrCmdKey(), Keystrokes.SHIFT, KeyStroke.getInstance("D"));
} catch (ParseException e) {
e.printStackTrace();
assertTrue("快捷键解析错误。", false);
}
} else {
assertTrue("参数错误,该功能无此入口:" + from, false);
}
dialog = new DatabaseManagementDialog(DatabaseManagementDialog.MANAGEMENT);
return dialog;
}
Aggregations