use of net.heartsome.cat.ts.test.ui.dialogs.MemoryDatabaseManagementDialog in project translationstudio8 by heartsome.
the class MemoryDBManagement method openDBMgmgDialog.
// 以下为非完整步骤
/**
* @param from
* 入口,请使用 TSUIConstants 类中提供的枚举。
* @return 打开的库管理对话框;
*/
public MemoryDatabaseManagementDialog openDBMgmgDialog(Entry from) {
if (from.equals(TsUIConstants.Entry.MENU)) {
if (isMemory) {
ts.menuDBManagement().click();
} else {
ts.menuTeriDBManagement().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 MemoryDatabaseManagementDialog(MemoryDatabaseManagementDialog.MANAGEMENT, isMemory ? "dlgTitleMemoryManagement" : "dlgTitletreiTbManagement");
return dialog;
}
use of net.heartsome.cat.ts.test.ui.dialogs.MemoryDatabaseManagementDialog in project translationstudio8 by heartsome.
the class MemoryDBManagement method selectDB.
/**
* 完整流程:选择库;
* @param dbName
* 要选择的数据库名称,其他信息直接从 Excel 中读取
*/
public void selectDB(String dbName) {
mode = MemoryDatabaseManagementDialog.SELECT;
getDataConnect(mode);
dialog = new MemoryDatabaseManagementDialog(MemoryDatabaseManagementDialog.SELECT, isMemory ? "dlgTitleMemoryManagement" : "dlgTitletreiTbManagement");
dialog.activate();
getDBListFromServer(false);
assertTrue("数据库名称:" + dbName + ",实际内容:" + table.cell(0, 1), isExist(dbName));
table.unselect();
table.select(table.rowIndexOfColumn(dbName, TsUIConstants.getString("tblColDatabaseName")));
dialog.btnOK().click();
Waits.shellClosed(dialog);
}
Aggregations