public void validateRun (String configurationName,String projectName,String filepath,boolean printUnvisited,boolean verbose,String startElement,String generator) { SWTBotShell shell = openExistingRun (configurationName); SWTBotText projectText = shell.bot().textWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_TEXT_ID_PROJECT); assertEquals("Wrong project name",projectName,projectText.getText()); SWTBotText modelText = shell.bot().textWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_TEXT_ID_MODEL); assertEquals("Wrong model name",filepath,modelText.getText()); SWTBotCheckBox verboseButton = shell.bot().checkBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_BUTTON_ID_VERBOSE); assertEquals("Wrong verbose value",verbose,verboseButton.isChecked()); SWTBotCheckBox unvisitedButton = shell.bot().checkBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_BUTTON_ID_PRINT_UNVISITED); assertEquals("Wrong verbose value",verbose,unvisitedButton.isChecked()); SWTBotText startElementText = shell.bot().textWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_TEXT_ID_START_ELEMENT); assertEquals("Wrong start element",startElement,startElementText.getText()); SWTBotCombo generatorCombo = shell.bot().comboBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_COMBO_PATH_GENERATOR_ID_MODEL); assertEquals("Wrong generator value",generator,generatorCombo.getText()); SWTBotButton closeButton = bot.button("Close"); closeButton.click(); bot.waitUntil(Conditions.shellCloses(shell)); }
public void toggleBlocked(SWTBotGefEditPart part) { selectPart(part); selectTab(part, PROPERTIES); SWTBotCheckBox checkbox = bot.checkBoxWithId(VertexDefaultSection.WIDGET_ID,VertexDefaultSection.WIDGET_BUTTON_BLOCKED); if (checkbox.isChecked()) { checkbox.deselect(); } else { checkbox.select(); } }
public void setFailed(SWTBotShell page) { SWTBotCheckBox button = page.bot().checkBoxWithId( org.gw4e.eclipse.wizard.runasmanual.StepPage.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, org.gw4e.eclipse.wizard.runasmanual.StepPage.GW4E_STEP_PAGE_BUTTON_FAILED_ID); if (!button.isChecked()) button.click(); }
private void showConsolePreference(SWTBotShell shell) { SWTBotTree tree = bot.tree().select("Run/Debug"); SWTBotTreeItem item = tree.getTreeItem("Console"); item.click(); SWTBotCheckBox button = bot.checkBoxWithLabel("Limit console output"); if (button.isChecked()) button.click(); }
private void showConsolePreference(SWTBotShell shell) { SWTBotTree tree = bot.tree().select("Run/Debug"); tree.expandNode("Run/Debug", true); SWTBotTreeItem[] items = tree.getAllItems(); for (SWTBotTreeItem swtBotTreeItem : items) { if (swtBotTreeItem.getText().equalsIgnoreCase("Run/Debug")) { swtBotTreeItem.getNode("Console").select(); } } try { int max = 10; for (int i = 0; i < max; i++) { SWTBotCheckBox button = bot.checkBox(i); if (button.getText().equalsIgnoreCase("&Limit console output")) { if (button.isChecked()) { button.click(); break; } } } } catch (Exception e) { } String name = "OK"; if (GW4EPlatform.isEclipse47()) name = "Apply and Close"; bot.button(name).click(); }
private void setOmitOption (boolean value) { SWTBotCheckBox button = bot.checkBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_BUTTON_ID_OMIT_EMPTY_EDGE); if (value && !button.isChecked()) { button.select(); } else { if (!value && button.isChecked()) { button.deselect(); } } }
private void setRemoveBlockedElement (boolean value) { SWTBotCheckBox button = bot.checkBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_BUTTON_ID_REMOVE_BLOCKED_ELEMENTS); if (value && !button.isChecked()) { button.select(); } else { if (!value && button.isChecked()) { button.deselect(); } } }
@Test public void testUncheckStopPreviousVersionButtonWhenDisabled() { deployPanel = createPanel(true /* requireValues */); Button promoteButton = getButtonWithText("Promote the deployed version to receive all traffic"); Button stopButton = getButtonWithText("Stop previous version"); SWTBotCheckBox promote = new SWTBotCheckBox(promoteButton); SWTBotCheckBox stop = new SWTBotCheckBox(stopButton); // Initially, everything is checked and enabled. assertTrue(promoteButton.getSelection()); assertTrue(stopButton.getSelection()); assertTrue(stopButton.getEnabled()); promote.click(); assertFalse(promoteButton.getSelection()); assertFalse(stopButton.getSelection()); assertFalse(stopButton.getEnabled()); promote.click(); assertTrue(promoteButton.getSelection()); assertTrue(stopButton.getSelection()); assertTrue(stopButton.getEnabled()); stop.click(); assertTrue(promoteButton.getSelection()); assertFalse(stopButton.getSelection()); assertTrue(stopButton.getEnabled()); promote.click(); assertFalse(promoteButton.getSelection()); assertFalse(stopButton.getSelection()); assertFalse(stopButton.getEnabled()); promote.click(); assertTrue(promoteButton.getSelection()); assertFalse(stopButton.getSelection()); assertTrue(stopButton.getEnabled()); }
@Test public void testDynamicEnabling() { Button asMavenProject = CompositeUtil.findControl(shell, Button.class); new SWTBotCheckBox(asMavenProject).click(); assertTrue(getGroupIdField().getEnabled()); assertTrue(getArtifactIdField().getEnabled()); assertTrue(getVersionField().getEnabled()); new SWTBotCheckBox(asMavenProject).click(); assertFalse(getGroupIdField().getEnabled()); assertFalse(getArtifactIdField().getEnabled()); assertFalse(getVersionField().getEnabled()); }
private SWTBotCheckBox getButton(String libraryId) { for (Button button : librariesSelector.getLibraryButtons()) { if (libraryId.equals(((Library) button.getData()).getId())) { return new SWTBotCheckBox(button); } } fail("Could not find button for " + libraryId); return null; // won't be reached }
public static void setCheckBox(SWTBotCheckBox checkBox, boolean checked) { if (checked) { checkBox.select(); } else { checkBox.deselect(); } }
@Test public void testThatAddToWorkingSetCheckboxIsUncheckedByDefault() { openImportProjectWizardPage(); final SWTBotCheckBox addToWorkingSetCheckBox = bot.checkBox(0); Assert.assertFalse(addToWorkingSetCheckBox.isChecked()); }
@Test public void testThatCheckingAddToWorkingSetSelectButtonIsEnabled() { openImportProjectWizardPage(); final SWTBotButton workingSetSelectButton = bot.button("Select..."); final SWTBotCheckBox addToWorkingSetCheckBox = bot.checkBox(0); addToWorkingSetCheckBox.click(); Assert.assertTrue(workingSetSelectButton.isEnabled()); }
public boolean isShared(SWTBotGefEditPart part) { selectPart(part); selectTab(part, PROPERTIES); SWTBotCheckBox checkbox = bot.checkBoxWithId(VertexDefaultSection.WIDGET_ID,VertexDefaultSection.WIDGET_BUTTON_SHARED); return checkbox.isChecked(); }
public void toggleFilterOn () { SWTBotCheckBox button = botView.bot().checkBoxWithId(OutLineComposite.GW_WIDGET_ID, OutLineComposite.GW_OUTLINE_FILTER_BUTTON); if (button.isChecked()) return; button.click(); }
public void toggleFilterOff() { SWTBotCheckBox button = botView.bot().checkBoxWithId(OutLineComposite.GW_WIDGET_ID, OutLineComposite.GW_OUTLINE_FILTER_BUTTON); if (button.isChecked()) { button.click(); } }
private SWTBotCheckBox getBtnUpdateIfTestcaseid() { return bot.checkBoxWithId(org.gw4e.eclipse.wizard.runasmanual.SaveTestPage.GW4E_MANUAL_ELEMENT_ID, org.gw4e.eclipse.wizard.runasmanual.SaveTestPage.GW4E_MANUAL_BUTTON_UPDATE_IF_TESTCASE_ID); }
public void checkEraseExistingFile() { SWTBotCheckBox b = bot.checkBoxWithId(GeneratorResourceUIPage.GW4E_GENERATOR_CHOICE_CHECKBOX_ID, GeneratorResourceUIPage.GW4E_GENERATOR_CHOICE_ERASE_CHECKBOX); b.click(); }
public void allowBeforeAfterExecutionHook () { SWTBotCheckBox checkButton = bot.checkBoxWithId(GW4EHookUIPage.GW4E_CONVERSION_CONTROL_ID, GW4EHookUIPage.GW4E_CONVERSION_CHOICE_GENERATE_EXECUTON_BEFORE_AFTER_CHECKBOX); checkButton.click(); }
public void allowPerformanceReport() { SWTBotCheckBox checkButton = bot.checkBoxWithId(GW4EHookUIPage.GW4E_CONVERSION_CONTROL_ID, GW4EHookUIPage.GW4E_CONVERSION_CHOICE_GENERATE_PERFORMNCE_REPORT_CHECKBOX); checkButton.click(); }
public void allowBeforeAfterElementHook () { SWTBotCheckBox checkButton = bot.checkBoxWithId(GW4EHookUIPage.GW4E_CONVERSION_CONTROL_ID, GW4EHookUIPage.GW4E_CONVERSION_CHOICE_GENERATE_ELEMENT_BEFORE_AFTER_CHECKBOX); checkButton.click(); }
public void allowJUnitSmokeTest () { SWTBotCheckBox checkButton = bot.checkBoxWithId(JUnitGW4ETestUIPage.GW4E_CONVERSION_WIDGET_ID, JUnitGW4ETestUIPage.GW4E_CONVERSION_CHOICE_GENERATE_RUN_SMOKE_TEST_CHECKBOX); checkButton.click(); }
public void allowJUnitFunctionalTest () { SWTBotCheckBox checkButton = bot.checkBoxWithId(JUnitGW4ETestUIPage.GW4E_CONVERSION_WIDGET_ID, JUnitGW4ETestUIPage.GW4E_CONVERSION_CHOICE_GENERATE_RUN_FUNCTIONNAL_TEST_CHECKBOX); checkButton.click(); }
public void allowJUnitStabilityTest () { SWTBotCheckBox checkButton = bot.checkBoxWithId(JUnitGW4ETestUIPage.GW4E_CONVERSION_WIDGET_ID, JUnitGW4ETestUIPage.GW4E_CONVERSION_CHOICE_GENERATE_RUN_STABILITY_TEST_CHECKBOX); checkButton.click(); }
public void allowHint () { SWTBotCheckBox checkButton = bot.checkBoxWithId(JUnitGW4ETestUIPage.GW4E_CONVERSION_WIDGET_ID, JUnitGW4ETestUIPage.GW4E_LAUNCH_TEST_CONFIGURATION_HINT_BUTTON); checkButton.click(); }
public void allowGraphWalkerTest () { SWTBotCheckBox checkButton = bot.checkBoxWithId(GraphWalkerTestUIPage.GW4E_CONVERSION_CONTROL_ID, GraphWalkerTestUIPage.GW4E_CONVERSION_CHOICE_GENERATE_GRAPHWALKER_CHECKBOX); checkButton.click(); }
public void allowGraphWalkerModelBasedTestTest () { SWTBotCheckBox checkButton = bot.checkBoxWithId(GraphWalkerTestUIPage.GW4E_CONVERSION_CONTROL_ID, GraphWalkerTestUIPage.GW4E_CONVERSION_CHOICE_GENERATE_RUN_MODEL_TEST_CHECKBOX); checkButton.click(); }
public void toggleBuildButton () { SWTBotCheckBox button = shell.bot().checkBoxWithId(LabelizedCheckBoxes.PROJECT_PROPERTY_PAGE_WIDGET_ID, LabelizedCheckBoxes.BUTTON + ".0"); button.click(); }
public void toggleSynchronizationButton () { SWTBotCheckBox button = shell.bot().checkBoxWithId(LabelizedCheckBoxes.PROJECT_PROPERTY_PAGE_WIDGET_ID, LabelizedCheckBoxes.BUTTON + ".3"); button.click(); }
public void togglePerformanceLoggingButton () { SWTBotCheckBox button = shell.bot().checkBoxWithId(LabelizedCheckBoxes.PROJECT_PROPERTY_PAGE_WIDGET_ID, LabelizedCheckBoxes.BUTTON + ".2"); button.click(); }
private void enableUi() { Button asMavenProject = CompositeUtil.findControl(shell, Button.class); new SWTBotCheckBox(asMavenProject).click(); }
/** * @return 复选框:总是在后台运行; */ public SWTBotCheckBox chkbxAlwaysRunInBackground() { return dlgBot.checkBox(TsUIConstants.getString("chkbxAlwaysRunInBackground")); }
/** * @return 复选框:启用共享库提示; */ public SWTBotCheckBox tmChkbxShareDBTips() { return dlgBot.checkBox(TsUIConstants.getString("prefTMChkbxShareDBTips")); }
/** * @return 复选框:使用自动快速翻译; */ public SWTBotCheckBox tmChkbxAutoQT() { return dlgBot.checkBox(TsUIConstants.getString("prefTMChkbxAutoQT")); }
/** * @return 复选框:匹配存在时不应用记忆库; */ public SWTBotCheckBox tmChkbxMatchExistNotApplyTM() { return dlgBot.checkBox(TsUIConstants.getString("prefTMChkbxMatchExistNotApplyTM")); }
/** * @return 复选框:搜索记忆库时区分大小写; */ public SWTBotCheckBox tmChkbxMatchCase() { return dlgBot.checkBox(TsUIConstants.getString("prefTMChkbxMatchCase")); }
/** * @return 复选框:匹配时使用标记自动补全; */ public SWTBotCheckBox tmChkbxAutoCompleteTag() { return dlgBot.checkBox(TsUIConstants.getString("prefTMChkbxAutoCompleteTag")); }
/** * @return 复选框:匹配时是否忽略标记; */ public SWTBotCheckBox tmChkbxIgnoreTag() { return dlgBot.checkBox(TsUIConstants.getString("prefTMChkbxIgnoreTag")); }
/** * @return 复选框:预翻译区分大小写; */ public SWTBotCheckBox transPreChkbxCaseSensitive() { return dlgBot.checkBox(TsUIConstants.getString("prefTransPreChkbxCaseSensitive")); }