visualweb.websvcmgr/test/qa-functional/src/org/netbeans/test/websvcmgr/WebServiceAcceptanceTest.java
author Jesse Glick <jglick@netbeans.org>
Wed, 23 Mar 2011 17:17:42 -0400
changeset 3214 cf80c1d5c3ea
parent 3213 c85dcf71e424
permissions -rw-r--r--
Really making tests compilable.
romanmostyka@2032
     1
/*
romanmostyka@2032
     2
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
romanmostyka@2032
     3
 *
jglick@2928
     4
 * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
jglick@2928
     5
 *
jglick@2928
     6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
jglick@2928
     7
 * Other names may be trademarks of their respective owners.
romanmostyka@2032
     8
 *
romanmostyka@2032
     9
 * The contents of this file are subject to the terms of either the GNU
romanmostyka@2032
    10
 * General Public License Version 2 only ("GPL") or the Common
romanmostyka@2032
    11
 * Development and Distribution License("CDDL") (collectively, the
romanmostyka@2032
    12
 * "License"). You may not use this file except in compliance with the
romanmostyka@2032
    13
 * License. You can obtain a copy of the License at
romanmostyka@2032
    14
 * http://www.netbeans.org/cddl-gplv2.html
romanmostyka@2032
    15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
romanmostyka@2032
    16
 * specific language governing permissions and limitations under the
romanmostyka@2032
    17
 * License.  When distributing the software, include this License Header
romanmostyka@2032
    18
 * Notice in each file and include the License file at
jglick@2928
    19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
romanmostyka@2032
    20
 * particular file as subject to the "Classpath" exception as provided
jglick@2928
    21
 * by Oracle in the GPL Version 2 section of the License file that
romanmostyka@2032
    22
 * accompanied this code. If applicable, add the following below the
romanmostyka@2032
    23
 * License Header, with the fields enclosed by brackets [] replaced by
romanmostyka@2032
    24
 * your own identifying information:
romanmostyka@2032
    25
 * "Portions Copyrighted [year] [name of copyright owner]"
romanmostyka@2032
    26
 *
romanmostyka@2032
    27
 * Contributor(s):
romanmostyka@2032
    28
 *
romanmostyka@2032
    29
 * The Original Software is NetBeans. The Initial Developer of the Original
romanmostyka@2032
    30
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
romanmostyka@2032
    31
 * Microsystems, Inc. All Rights Reserved.
romanmostyka@2032
    32
 *
romanmostyka@2032
    33
 * If you wish your version of this file to be governed by only the CDDL
romanmostyka@2032
    34
 * or only the GPL Version 2, indicate your decision by adding
romanmostyka@2032
    35
 * "[Contributor] elects to include this software in this distribution
romanmostyka@2032
    36
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
romanmostyka@2032
    37
 * single choice of license, a recipient has the option to distribute
romanmostyka@2032
    38
 * your version of this file under either the CDDL, the GPL Version 2 or
romanmostyka@2032
    39
 * to extend the choice of license to its licensees as provided above.
romanmostyka@2032
    40
 * However, if you add GPL Version 2 code and therefore, elected the GPL
romanmostyka@2032
    41
 * Version 2 license, then the option applies only if the new code is
romanmostyka@2032
    42
 * made subject to such option by the copyright holder.
romanmostyka@2032
    43
 */
romanmostyka@2032
    44
romanmostyka@2032
    45
package org.netbeans.test.websvcmgr;
romanmostyka@2032
    46
jglick@3214
    47
import com.meterware.httpunit.WebConversation;
jglick@3214
    48
import com.meterware.httpunit.WebResponse;
romanmostyka@2032
    49
import org.netbeans.jemmy.operators.*;
romanmostyka@2032
    50
import org.netbeans.junit.NbTestSuite;
romanmostyka@2032
    51
import junit.framework.Test;
romanmostyka@2032
    52
romanmostyka@2032
    53
import org.netbeans.modules.visualweb.gravy.dataconnectivity.ServerNavigatorOperator;
romanmostyka@2032
    54
import org.netbeans.modules.visualweb.gravy.dataconnectivity.ServerExplorerOperator;
romanmostyka@2032
    55
import org.netbeans.modules.visualweb.gravy.designer.DesignerPaneOperator;
romanmostyka@2032
    56
import org.netbeans.modules.visualweb.gravy.plugins.PluginsOperator;
romanmostyka@2032
    57
import org.netbeans.modules.visualweb.gravy.actions.FindAction;
romanmostyka@2032
    58
import org.netbeans.modules.visualweb.gravy.websvc.*;
romanmostyka@2032
    59
import org.netbeans.modules.visualweb.gravy.model.project.components.*;
romanmostyka@2032
    60
import org.netbeans.modules.visualweb.gravy.model.project.*;
romanmostyka@2032
    61
import org.netbeans.modules.visualweb.gravy.model.components.*;
romanmostyka@2032
    62
import org.netbeans.modules.visualweb.gravy.model.deployment.*;
romanmostyka@2032
    63
import org.netbeans.modules.visualweb.gravy.model.*;
romanmostyka@2032
    64
import org.netbeans.modules.visualweb.gravy.*;
romanmostyka@2032
    65
romanmostyka@2032
    66
import java.util.Properties;
romanmostyka@2032
    67
import java.awt.event.KeyEvent;
romanmostyka@2032
    68
import java.awt.Point;
romanmostyka@2032
    69
import java.io.File;
romanmostyka@2032
    70
import java.io.FileInputStream;
romanmostyka@2032
    71
romanmostyka@2032
    72
/**
romanmostyka@2032
    73
 *
romanmostyka@2032
    74
 * @author Roman Mostyka
romanmostyka@2032
    75
 */
romanmostyka@2032
    76
romanmostyka@2032
    77
public class WebServiceAcceptanceTest extends RaveTestCase {
romanmostyka@2032
    78
romanmostyka@2032
    79
    private static String addBindingAttribute = Bundle.getStringTrimmed("org.netbeans.modules.visualweb.insync.action.Bundle","LBL_AddBindingAttributeActionName");
romanmostyka@2032
    80
    private static String sep = File.separator;
romanmostyka@2032
    81
    private static String wsPath = "Web Services|";
romanmostyka@2032
    82
    private static String deletePopup = "Delete";
romanmostyka@2032
    83
    private static String reformatPopup = "Format";
romanmostyka@2032
    84
    private static String addToPagePopup = "Add to Page";
romanmostyka@2483
    85
    private static String menuCopy = "Edit|Copy";
romanmostyka@2483
    86
    private static String menuPaste = "Edit|Paste";
romanmostyka@2032
    87
    private static String testMethod = "Test Method";
romanmostyka@2032
    88
    private static String dlgQuestion = "Question";
romanmostyka@2032
    89
    private static String dlgTestMethod = "Test Web Service Method";
romanmostyka@2032
    90
    private static String btnYes = "Yes";
romanmostyka@2032
    91
    private static String btnSubmit = "Submit";
romanmostyka@2032
    92
    private static String _wsProjectName = "AcceptanceWSProject";
romanmostyka@2032
    93
    private static String _projectPath = System.getProperty("xtest.workdir") + sep + "projects" + sep;
romanmostyka@2032
    94
    private static String wsURL = "URL";
romanmostyka@2032
    95
    private static String wsName = "PATH";
romanmostyka@2032
    96
    private static String wsMethod = "METHOD";
romanmostyka@2032
    97
    private static String wsMethodParameter = "PARAMETER";
romanmostyka@2032
    98
    private static String pluginName = "Visual Web JSF Backwards Compatibility Kit";
romanmostyka@2032
    99
    private static String javaCode = "CODE";
romanmostyka@2032
   100
    private static String wsResponse = "RESPONSE";
romanmostyka@2032
   101
    private static String serverType = "GlassFish V2";
romanmostyka@2032
   102
romanmostyka@2032
   103
    private static Project prj, J2EE14prj, JavaEE5prj;
romanmostyka@2032
   104
    private static DeploymentTargetDescriptor dtd;
romanmostyka@2032
   105
    private static DeploymentTarget dt;
romanmostyka@2032
   106
    private static ApplicationServer as;
romanmostyka@2032
   107
    private static Properties properties;
romanmostyka@2032
   108
romanmostyka@2032
   109
    private ServerNavigatorOperator server;
romanmostyka@2032
   110
    private JTreeOperator sntree;
romanmostyka@2032
   111
   
romanmostyka@2032
   112
    /** constructor required by JUnit
romanmostyka@2032
   113
     * @param testName method name to be used as testcase
romanmostyka@2032
   114
     */
romanmostyka@2032
   115
    public WebServiceAcceptanceTest(String testName) {
romanmostyka@2032
   116
        super(testName);
romanmostyka@2032
   117
    }
romanmostyka@2032
   118
romanmostyka@2032
   119
    public static Test suite() {
romanmostyka@2032
   120
        NbTestSuite suite = new NbTestSuite("Web Service Consumption Acceptance Tests");
romanmostyka@2032
   121
        suite.addTest(new WebServiceAcceptanceTest("testPreparation"));
romanmostyka@2032
   122
        suite.addTest(new WebServiceAcceptanceTest("testAddWebService"));
romanmostyka@2032
   123
        suite.addTest(new WebServiceAcceptanceTest("testTestMethodDialog"));
romanmostyka@2032
   124
        suite.addTest(new WebServiceAcceptanceTest("testAddWebServiceToJ2EE14Project"));
romanmostyka@2032
   125
        suite.addTest(new WebServiceAcceptanceTest("testDeployJ2EE14Project"));
romanmostyka@2032
   126
        suite.addTest(new WebServiceAcceptanceTest("testAddWebServiceToJavaEE5Project"));
romanmostyka@2032
   127
        suite.addTest(new WebServiceAcceptanceTest("testDeployJavaEE5Project"));
romanmostyka@2032
   128
        suite.addTest(new WebServiceAcceptanceTest("testRemoveWebService"));
romanmostyka@2032
   129
        return suite;
romanmostyka@2032
   130
    }
romanmostyka@2032
   131
romanmostyka@2032
   132
    /** method called before each testcase
romanmostyka@2032
   133
     */
romanmostyka@2032
   134
    protected void setUp() {
romanmostyka@2032
   135
    }
romanmostyka@2032
   136
romanmostyka@2032
   137
    public void testPreparation() {
romanmostyka@2032
   138
        properties = new Properties();
romanmostyka@2032
   139
        try {
romanmostyka@2032
   140
            properties.load(new FileInputStream(System.getProperty("xtest.ws-properties.file")));
romanmostyka@2032
   141
        } catch(Exception e) {
romanmostyka@2032
   142
            System.out.println("Properties can not be loaded!");
romanmostyka@2032
   143
            System.out.println("e=" + e.toString());
romanmostyka@2032
   144
            return;
romanmostyka@2032
   145
        }
romanmostyka@2032
   146
        PluginsOperator.getInstance().installAvailablePlugins(pluginName);
romanmostyka@2032
   147
        dtd = new DeploymentTargetDescriptor();
romanmostyka@2032
   148
        dtd.load();
romanmostyka@2032
   149
        if (serverType != null) dtd.setProperty(dtd.SERVER_TYPE_KEY, serverType);
romanmostyka@2032
   150
        dt = IDE.getIDE().addDeploymentTarget(dtd);
romanmostyka@2032
   151
        as = (ApplicationServer) dt;
romanmostyka@2032
   152
        as.start();
romanmostyka@2032
   153
        TestUtils.wait(1000);
romanmostyka@2032
   154
    }
romanmostyka@2032
   155
romanmostyka@2032
   156
    public void testAddWebService() {
romanmostyka@2032
   157
        server = ServerNavigatorOperator.showNavigatorOperator();
romanmostyka@2032
   158
        server.pushPopup("Web Services", "Add Web Service...");
romanmostyka@2032
   159
        AddWebServiceOperator wsOp = new AddWebServiceOperator();
romanmostyka@2032
   160
        wsOp.addWebService(properties.get(wsURL).toString());
romanmostyka@2032
   161
        TestUtils.wait(2000);
romanmostyka@2032
   162
    }
romanmostyka@2032
   163
romanmostyka@2032
   164
    public void testTestMethodDialog(){
romanmostyka@2032
   165
        server = ServerNavigatorOperator.showNavigatorOperator();
romanmostyka@2032
   166
        TestUtils.wait(4000);
romanmostyka@2032
   167
        server.pushPopup(wsPath + properties.get(wsMethod).toString(), testMethod);
romanmostyka@2032
   168
        TestUtils.wait(1000);
romanmostyka@2032
   169
        JDialogOperator jdo = new JDialogOperator(dlgTestMethod);
romanmostyka@2032
   170
        TestUtils.wait(1000);
romanmostyka@2032
   171
        JTableOperator jto1 = new JTableOperator(jdo, 0);
romanmostyka@2032
   172
        TestUtils.wait(1000);
romanmostyka@2032
   173
        jto1.changeCellObject(0, 2, properties.get(wsMethodParameter).toString());
romanmostyka@2032
   174
        TestUtils.wait(1000);
romanmostyka@2032
   175
        new JButtonOperator(jdo, btnSubmit).push();
romanmostyka@2483
   176
        TestUtils.wait(10000);
romanmostyka@2032
   177
        JTableOperator jto2 = new JTableOperator(jdo, 1);
romanmostyka@2032
   178
        if (jto2.getValueAt(0, 1).toString().indexOf(properties.get(wsResponse).toString()) == -1) {
romanmostyka@2032
   179
            fail("There is no needed string in response!");
romanmostyka@2032
   180
            jdo.close();
romanmostyka@2032
   181
        }
romanmostyka@2032
   182
        jdo.close();
romanmostyka@2032
   183
    }
romanmostyka@2032
   184
    
romanmostyka@2032
   185
    public void testAddWebServiceToJ2EE14Project() {
romanmostyka@2032
   186
        J2EE14prj = createProject(ProjectDescriptor.J2EE14);
romanmostyka@2032
   187
        addComponentToProject(J2EE14prj);
romanmostyka@2032
   188
        addWebServiceToProject();
romanmostyka@2032
   189
        editPrerenderMethod(properties.get(javaCode).toString());
romanmostyka@2032
   190
    }
romanmostyka@2032
   191
romanmostyka@2032
   192
    public void testDeployJ2EE14Project() {
romanmostyka@2032
   193
        DeployAndCheckProject(J2EE14prj);
romanmostyka@2032
   194
        verifyHTTP(J2EE14prj, wsResponse);
romanmostyka@2032
   195
        projectUndeployAndClose(J2EE14prj);
romanmostyka@2032
   196
    }
romanmostyka@2032
   197
romanmostyka@2032
   198
    public void testAddWebServiceToJavaEE5Project() {
romanmostyka@2032
   199
        JavaEE5prj = createProject(ProjectDescriptor.JavaEE5);
romanmostyka@2032
   200
        addComponentToProject(JavaEE5prj);
romanmostyka@2032
   201
        addWebServiceToProject();
romanmostyka@2032
   202
        editPrerenderMethod(properties.get(javaCode).toString());
romanmostyka@2032
   203
    }
romanmostyka@2032
   204
romanmostyka@2032
   205
    public void testDeployJavaEE5Project() {
romanmostyka@2032
   206
        DeployAndCheckProject(JavaEE5prj);
romanmostyka@2032
   207
        verifyHTTP(JavaEE5prj, wsResponse);
romanmostyka@2032
   208
        projectUndeployAndClose(JavaEE5prj);
romanmostyka@2032
   209
        as.stop();
romanmostyka@2032
   210
    }
romanmostyka@2032
   211
    
romanmostyka@2032
   212
    public void testRemoveWebService() {
romanmostyka@2032
   213
        server = ServerNavigatorOperator.showNavigatorOperator();
romanmostyka@2032
   214
        TestUtils.wait(4000);
romanmostyka@2032
   215
        String wsClientPath = properties.get(wsName).toString();
romanmostyka@2032
   216
        String realPath = wsPath + 
romanmostyka@2032
   217
            wsClientPath.substring(0, wsClientPath.indexOf("|"));
romanmostyka@2032
   218
        server.pushPopup(realPath, deletePopup);
romanmostyka@2032
   219
        new JButtonOperator(new DialogOperator(dlgQuestion), btnYes).push();
romanmostyka@2032
   220
        TestUtils.wait(2000);
romanmostyka@2032
   221
    }
romanmostyka@2032
   222
romanmostyka@2032
   223
    private Project createProject(String J2EEVersion) {
romanmostyka@2032
   224
        String J2EEVersion_PREF = J2EEVersion.replace(' ', '_').replace('.', '_');
romanmostyka@2032
   225
        ProjectDescriptor pd = new ProjectDescriptor(_wsProjectName + "_" + J2EEVersion_PREF, _projectPath, J2EEVersion, as.getName());
romanmostyka@2032
   226
        Project prj = IDE.getIDE().createProject(pd);
romanmostyka@2032
   227
        TestUtils.disableBrowser(prj.getName(), true);
romanmostyka@2032
   228
        TestUtils.wait(1000);
romanmostyka@2032
   229
        return prj;
romanmostyka@2032
   230
    }
romanmostyka@2032
   231
romanmostyka@2032
   232
    private void addComponentToProject(Project prj) {
romanmostyka@2032
   233
        WebPageFolder wpf = prj.getRoot().getWebPageRootFolder();
romanmostyka@2032
   234
        WebPage wp = wpf.getWebPage("Page1");
romanmostyka@2032
   235
        VisualComponent vcmp = (VisualComponent)
romanmostyka@2032
   236
        wp.add((WebComponent)
romanmostyka@2032
   237
        IDE.getIDE().getDefaultComponentSet().getComponent(StaticTextComponent.STATIC_TEXT_ID),
romanmostyka@2032
   238
        new Point(48, 48));
romanmostyka@2032
   239
        addBindingAttribute(wp.getName(), "page1|html1|body1|form1|" + vcmp.getName());
romanmostyka@2032
   240
    }
romanmostyka@2032
   241
romanmostyka@2032
   242
    private void addWebServiceToProject() {
romanmostyka@2032
   243
        server = ServerNavigatorOperator.showNavigatorOperator();
romanmostyka@2032
   244
        TestUtils.wait(4000);
romanmostyka@2032
   245
        sntree = server.getTree();
romanmostyka@2483
   246
        server.selectPath(wsPath + properties.get(wsName).toString());
romanmostyka@2483
   247
        Util.getMainMenu().pushMenu(menuCopy);
romanmostyka@2483
   248
        WebPageFolder wpf = prj.getRoot().getWebPageRootFolder();
romanmostyka@2483
   249
        WebPage wp = wpf.getWebPage("Page1");
romanmostyka@2483
   250
        wp.open();
romanmostyka@2483
   251
        TestUtils.wait(1000);
romanmostyka@2483
   252
        Util.getMainMenu().pushMenu(menuPaste);
romanmostyka@2032
   253
        TestUtils.wait(30000);
romanmostyka@2032
   254
    }
romanmostyka@2032
   255
romanmostyka@2032
   256
    private void editPrerenderMethod(String code) {
romanmostyka@2032
   257
        DesignerPaneOperator designer = new DesignerPaneOperator(RaveWindowOperator.getDefaultRave());
romanmostyka@2032
   258
        designer.switchToJavaSource();
romanmostyka@2032
   259
        TestUtils.wait(1000);
romanmostyka@2032
   260
        EditorOperator editor = new EditorOperator(RaveWindowOperator.getDefaultRave(), "Page1.java");
romanmostyka@2032
   261
        TestUtils.wait(2000);
romanmostyka@2032
   262
        new FindAction().performShortcut();
romanmostyka@2032
   263
        TestUtils.wait(2000);
romanmostyka@2032
   264
        JComboBoxOperator jcbo = new JComboBoxOperator(editor);
romanmostyka@2032
   265
        TestUtils.wait(500);
romanmostyka@2032
   266
        jcbo.clearText();
romanmostyka@2032
   267
        TestUtils.wait(500);
romanmostyka@2032
   268
        jcbo.enterText("prerender() {");
romanmostyka@2032
   269
        TestUtils.wait(500);
romanmostyka@2032
   270
        jcbo.pressKey(KeyEvent.VK_ESCAPE);
romanmostyka@2032
   271
        TestUtils.wait(500);
romanmostyka@2032
   272
        jcbo.pressKey(KeyEvent.VK_RIGHT);
romanmostyka@2032
   273
        TestUtils.wait(500);
romanmostyka@2032
   274
        editor.setCaretPositionToEndOfLine(editor.getLineNumber());
romanmostyka@2032
   275
        TestUtils.wait(500);
romanmostyka@2032
   276
        editor.pressKey(KeyEvent.VK_ENTER);
romanmostyka@2032
   277
        TestUtils.wait(2000);
romanmostyka@2032
   278
        editor.txtEditorPane().typeText(code);
romanmostyka@2032
   279
        editor.txtEditorPane().clickForPopup();
romanmostyka@2032
   280
        JPopupMenuOperator epm = new JPopupMenuOperator();
romanmostyka@2032
   281
        TestUtils.wait(1000);
romanmostyka@2032
   282
        new JMenuItemOperator(epm, reformatPopup).push();
romanmostyka@2032
   283
        TestUtils.wait(2000);
romanmostyka@2032
   284
    }
romanmostyka@2032
   285
romanmostyka@2032
   286
    private void DeployAndCheckProject(Project prj) {
romanmostyka@2032
   287
        Util.getMainWindow().deploy();
romanmostyka@2032
   288
        TestUtils.wait(20000);
romanmostyka@2032
   289
        server = ServerNavigatorOperator.showNavigatorOperator();
romanmostyka@2032
   290
        TestUtils.wait(4000);
romanmostyka@2032
   291
        sntree = server.getTree();
romanmostyka@2032
   292
        server.pushPopup(ServerExplorerOperator.STR_SERVERS_PATH + as.web_applications_path, as.REFRESH);
romanmostyka@2032
   293
        TestUtils.wait(1000);
romanmostyka@2032
   294
        try {
romanmostyka@2032
   295
            sntree.selectPath(sntree.findPath(ServerExplorerOperator.STR_SERVERS_PATH + as.web_applications_path + "|" + as.app_pref + prj.getName()));
romanmostyka@2032
   296
        }
romanmostyka@2032
   297
        catch (Exception e) {
romanmostyka@2032
   298
            fail("There is no " + prj.getName() + " application in Deployed Components node!");
romanmostyka@2032
   299
        }
romanmostyka@2032
   300
        TestUtils.wait(1000);
romanmostyka@2032
   301
    }
romanmostyka@2032
   302
romanmostyka@2032
   303
    private void verifyHTTP(Project prj, String verificationString) {
romanmostyka@2032
   304
        try {
romanmostyka@2032
   305
            WebConversation conversation = new WebConversation();
romanmostyka@2032
   306
            WebResponse response = null;
romanmostyka@2032
   307
            System.out.println("requestPrefix=" + as.requestPrefix);
romanmostyka@2032
   308
            response = conversation.getResponse(as.requestPrefix + prj.getName());
romanmostyka@2032
   309
            if (response.getText().indexOf(properties.get(wsResponse).toString()) == -1) fail("There is no needed string in response!");
romanmostyka@2032
   310
        } catch (Exception e) {
romanmostyka@2032
   311
            System.out.println("Exception occured: ");
romanmostyka@2032
   312
            e.printStackTrace();
romanmostyka@2032
   313
            fail("Excetion in HTTP check : " + e);
romanmostyka@2032
   314
        }
romanmostyka@2032
   315
    }
romanmostyka@2032
   316
romanmostyka@2032
   317
    private void projectUndeployAndClose(Project prj) {
romanmostyka@2032
   318
        TestUtils.wait(1000);
romanmostyka@2032
   319
        Util.saveAllAPICall();
romanmostyka@2032
   320
        server.pushPopup(ServerExplorerOperator.STR_SERVERS_PATH + as.web_applications_path, as.REFRESH);
romanmostyka@2032
   321
        TestUtils.wait(1000);
romanmostyka@2032
   322
        server.pushPopup(ServerExplorerOperator.STR_SERVERS_PATH + as.web_applications_path + "|" + as.app_pref + prj.getName(), as.APPLICATION_UNDEPLOY);
romanmostyka@2032
   323
        TestUtils.wait(1000);
romanmostyka@2032
   324
        prj.close();
romanmostyka@2032
   325
        TestUtils.wait(1000);
romanmostyka@2032
   326
    }
romanmostyka@2032
   327
romanmostyka@2032
   328
    public void addBindingAttribute(String page, String full_component_path) {
romanmostyka@2032
   329
        DocumentOutlineOperator outline = new DocumentOutlineOperator(RaveWindowOperator.getDefaultRave());
romanmostyka@2032
   330
        TestUtils.wait(1000);
romanmostyka@2032
   331
        JTreeOperator aotree = outline.getStructTreeOperator();
romanmostyka@2032
   332
        aotree.callPopupOnPath(aotree.findPath(page + "|" + full_component_path));
romanmostyka@2032
   333
        TestUtils.wait(1000);
romanmostyka@2032
   334
        JPopupMenuOperator aopm = new JPopupMenuOperator();
romanmostyka@2032
   335
        TestUtils.wait(1000);
romanmostyka@2032
   336
        new JMenuItemOperator(aopm, addBindingAttribute).pushNoBlock();
romanmostyka@2032
   337
        TestUtils.wait(1000);
romanmostyka@2032
   338
    }
romanmostyka@2032
   339
}
romanmostyka@2032
   340