Java Code Examples for org.netbeans.jemmy.operators.JLabelOperator#getLabelFor()
The following examples show how to use
org.netbeans.jemmy.operators.JLabelOperator#getLabelFor() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WebProjectValidation.java From netbeans with Apache License 2.0 | 6 votes |
public void testCreateTLD() { NewFileWizardOperator newFileWizard = NewFileWizardOperator.invoke(); // prevent NPE when initializing tooltip (path selection) new EventTool().waitNoEvent(1000); newFileWizard.selectProject(PROJECT_NAME); newFileWizard.selectCategory("Web"); newFileWizard.selectFileType("Tag Library Descriptor"); newFileWizard.next(); NewJavaFileNameLocationStepOperator nameAndLocationOper = new NewJavaFileNameLocationStepOperator(); nameAndLocationOper.setObjectName("MyTags"); nameAndLocationOper.cboLocation().selectItem("Web Pages"); JLabelOperator jle = new JLabelOperator(nameAndLocationOper, "Folder"); JTextFieldOperator folder = new JTextFieldOperator((JTextField) jle.getLabelFor()); folder.setText("WEB-INF/tlds"); nameAndLocationOper.finish(); Node node = new Node(new WebPagesNode(PROJECT_NAME), "WEB-INF|tlds|MyTags.tld"); // check class is opened in Editor and then close it new EditorOperator("MyTags.tld").close(); }
Example 2
Source File: WizardUtils.java From netbeans with Apache License 2.0 | 5 votes |
/** Finds Java EE Version combo box in wizard and sets it to requested version. * @param op wizard operator * @param version sub string of requested Java EE version * @return same wizard operator instance */ public static NewJavaProjectNameLocationStepOperator setJ2eeSpecVersion( NewJavaProjectNameLocationStepOperator op, String version) { op.next(); // "Java EE Version" String javaEEVersionLabel = Bundle.getStringTrimmed("org.netbeans.modules.javaee.project.api.ant.ui.wizard.Bundle", "LBL_NWP1_J2EESpecLevel_Label"); JLabelOperator lblJavaEEVersion = new JLabelOperator(op, javaEEVersionLabel); JComboBoxOperator cboVersion = new JComboBoxOperator((JComboBox)lblJavaEEVersion.getLabelFor()); cboVersion.selectItem(version); return op; }
Example 3
Source File: IndentCasesTest.java From netbeans with Apache License 2.0 | 5 votes |
public static void setIndent(int number){ OptionsOperator options = OptionsOperator.invoke(); options.selectEditor(); new JTabbedPaneOperator(options).selectPage("Formatting"); JLabelOperator label = new JLabelOperator(options, "Number"); JSpinner spinner = (JSpinner) label.getLabelFor(); JSpinnerOperator spinnerOp = new JSpinnerOperator(spinner); spinnerOp.getNumberSpinner().scrollToValue(number); options.ok(); }
Example 4
Source File: DTDActionsTest.java From netbeans with Apache License 2.0 | 5 votes |
private void setSwingBrowser() { OptionsOperator optionsOper = OptionsOperator.invoke(); optionsOper.selectGeneral(); // "Web Browser:" String webBrowserLabel = Bundle.getStringTrimmed(OPTIONS_GENERAL_BUNDLE, "CTL_Web_Browser"); JLabelOperator jloWebBrowser = new JLabelOperator(optionsOper, webBrowserLabel); JComboBoxOperator combo = new JComboBoxOperator((JComboBox)jloWebBrowser.getLabelFor()); combo.selectItem("Swing HTML Browser"); optionsOper.ok(); }