Esempio n. 1
0
 public static void search(SearchCriteria sc) {
   DOF.getTabFolder(dialog(), "File Search").click(atText("File Search"));
   if (sc.getProperty("text") != null) {
     DOF.getTextField(dialog(), "Containing text:").click();
     dialog().inputChars(sc.getProperty("text"));
   }
   if (sc.getProperty("pattern") != null) {
     DOF.getButton(dialog(), "Ch&oose...").click();
   }
 }
Esempio n. 2
0
 public boolean hasProperiesEntry(String entry) {
   try {
     tree().click(atPath(entry));
     DOF.getButton(dialog(), "OK").click();
     return true;
   } catch (Exception e) {
     DOF.getButton(dialog(), "OK").click();
     return false;
   }
 }
Esempio n. 3
0
  public boolean doWorkspaceNavigator(String foldername, String profiletype, boolean state) {
    // beging state should be set true

    if (state) {

    } else {
      GuiSubitemTestObject table = DOF.getTable(DOF.getRoot());
      int rowIndex = TableHelper.getRowIndexOfRecordInColumn(table, "Folder", foldername);
      // xuan option>>>>>>>>
      DOF.getRadioButton(DOF.getActiveDialog(), "On de&mand").click();
      // <<<<<<<<<<<
    }
    return state;
  }
Esempio n. 4
0
 /**
  * Script Name : <b>SP_Cut_Paste_03</b> Generated : <b>Sep 4, 2011 10:20:05 PM</b> Description :
  * Functional Test Script Original Host : WinNT Version 5.1 Build 2600 (S)
  *
  * @since 2011/09/04
  * @author eric
  */
 public void testMain(Object[] args) {
   WN.useProject(Cfg.projectName);
   WN.createWorkFlow(new WorkFlow().startParameter(Cfg.projectName).name("myWF"));
   WorkFlowEditor.addStartingPoint(new StartPoint().type(WorkFlow.SP_CREDENTIAL_REQUEST));
   vpManual("cutAndPaste", false, MenuHelper.isItemEnabled(DOF.getMenu(), "Edit->Cut"))
       .performTest();
 }
  /**
   * Script Name : <b>SP_Email_DB_mbo_attr_date</b> Generated : <b>Sep 13, 2011 2:25:24 PM</b>
   * Description : Functional Test Script Original Host : WinNT Version 5.1 Build 2600 (S)
   *
   * @since 2011/09/13
   * @author FANFEI
   */
  public void testMain(Object[] args) {
    // TODO Insert code here
    WN.useProject(Cfg.projectName);
    EE.dnd("Database Connections->My Sample Database->sampledb->Tables->employee (dba)");
    WN.createWorkFlow(new WorkFlow().startParameter(Cfg.projectName).name(Cfg.wfName));
    WorkFlowEditor.addStartingPoint(new StartPoint().type(WorkFlow.SP_SERVER_INIT));

    PropertiesView.setEmailMbo("Employee", Cfg.projectName);
    WorkFlowEditor.addScreen("A");
    WorkFlowEditor.link(WorkFlow.SP_SERVER_INIT, "A");
    DOF.getWFServerInitiateFlowStartingPointFigure().click();

    PropertiesView.clickTab("Keys");
    PropertiesView.setNewKeyBindMBO("key1,string,Employee,birth_date");
    vpManual(
            "Properies",
            "key1,DateTime,Employee/birth_date",
            PropertiesView.getKeyAttributesofStartPoint(new StartPoint()).getKey())
        .performTest();

    PropertiesView.setKeyUserDefined("key1");
    vpManual(
            "Properies",
            "key1,DateTime,",
            PropertiesView.getKeyAttributesofStartPoint(new StartPoint()).getKey())
        .performTest();
    vpManual("noerror", 0, Problems.getErrors().size()).performTest();
  }
Esempio n. 6
0
 /**
  * Script Name : <b>NQ_6</b> Generated : <b>Oct 10, 2011 4:28:51 PM</b> Description : Functional
  * Test Script Original Host : WinNT Version 5.1 Build 2600 (S)
  *
  * @since 2011/10/10
  * @author flvVm
  */
 public void testMain(Object[] args) {
   WN.useProject(Cfg.projectName);
   // MBO
   EE.dnd("Database Connections->My Sample Database->sampledb->Tables->department (dba)");
   // MBOProperties mbo = new MBOProperties(Cfg.projectName, "Department");
   WN.createObjectQuery(
       new ObjectQuery()
           .name("ObjQuery")
           .startParameter(WN.mboPath(Cfg.projectName, "Department"))
           .parameter("name,string,true,dept_name")
           .queryDefinition("SELECT x.* FROM Department x WHERE x.dept_name = :name")
           .returnType(ObjectQueryWizard.RT_MULTIPLE));
   // WF
   WN.createWorkFlow(new WorkFlow().startParameter(Cfg.projectName).name("myWF"));
   WorkFlowEditor.addStartingPoint(new StartPoint().type(WorkFlow.SP_CLIENT_INIT));
   WorkFlowEditor.addScreen("invokeScr");
   WorkFlowEditor.addScreen("resultScr");
   WorkFlowEditor.link("Client-initiated", "invokeScr");
   //
   WorkFlowEditor.addEditBox(
       Cfg.projectName,
       "myWF.xbw",
       "invokeScr",
       new WFEditBox().label("dept_Name").logicalType("TEXT").newKey("nameVal,string"));
   WorkFlowEditor.addMenuItem(
       "invokeScr",
       new WFScreenMenuItem()
           .name("ObjectQuery")
           .type("Online Request")
           .project(Cfg.projectName)
           .mbo("Department")
           .objectQuery("ObjQuery")
           .parametermapping("name,nameVal")
           .defaultSuccessScreen("resultScr"));
   //
   PropertiesView.clickTab("General");
   vpManual(
           "objectquery",
           true,
           DOF.getCCombo(DOF.getRoot(), "Object query:").getProperty("text").equals("ObjQuery"))
       .performTest();
   // vpManual("parameters", "name,nameVal",
   // PropertiesView.getMenuItem("ObjectQuery").getParameterMapping()[0]).performTest();
   //
   vpManual("error", 0, Problems.getErrors().size()).performTest();
 }
Esempio n. 7
0
 public IPropertiesPage path(String path) {
   DOF.getTree(dialog()).click(atPath(path));
   if (path.equals("Project Natures")) {
     return new ProjectNaturesPage(title);
   } else {
     throw new RuntimeException("Unknown path: " + path);
   }
 }
Esempio n. 8
0
  public boolean dofeature(String featurename, String profiletype, boolean state) {

    // beging state should be set true
    if (state) {

    } else {
      GuiSubitemTestObject table =
          DOF.getTableByColumnsNames(
              DOF.getDualHeadersTable(DOF.getRoot()),
              new String[] {"Feature", "Basic Profile", "Advanced Profile"});
      System.out.println("table :" + table.getParent());
      // need to get table..............................
      //			GuiSubitemTestObject table = DOF.getTable(DOF.getRoot());
      int rowIndex = TableHelper.getRowIndexOfRecordInColumn(table, "Feature", "Cache");

      System.out.println("rowindex = " + rowIndex);
      // xuan option>>>>>>>>

      //			DOF.getRadioButton(DOF.getActiveDialog(), "On de&mand").click();

      // <<<<<<<<<<<
    }
    return state;
  }
Esempio n. 9
0
 private static TopLevelTestObject dialog() {
   return DOF.getDialog("Search");
 }
  /**
   * Script Name : <b>Script1</b> Generated : <b>Oct 13, 2011 1:37:09 AM</b> Description :
   * Functional Test Script Original Host : WinNT Version 5.1 Build 2600 (S)
   *
   * @since 2011/10/13
   * @author xjf
   */
  public void testMain(Object[] args) {
    // TODO Insert code here
    WN.useProject(Cfg.projectName);
    EE.dnd(
        EE.parseResourcePath(
            "Database Connections->My Sample Database->sampledb->Tables->department (dba)"),
        50,
        90);

    WN.createWorkFlow(
        new WorkFlow()
            .startParameter(Cfg.projectName)
            .name("wfmbocreate")
            .option(WorkFlow.SP_CLIENT_INIT));

    // ******************add key from key tab
    DOF.getCTabItem(DOF.getRoot(), "Flow Design").click();
    DOF.getCTabFolder(DOF.getRoot(), "Properties").click(atText("Properties"));
    PropertiesView.clickTab("Keys");
    PropertiesView.NewKey("key1,string");

    // **************end

    // verify key duplicate
    WorkFlowEditor.addWidget("Start", new WFEditBox().label("editbox:"));

    TestObject[] boxes = DOF.getWFEditBoxFigures(DOF.getRoot());
    TestObject box = boxes[0];
    ((GefEditPartTestObject) box).click();
    PropertiesView.clickTab("General");

    DOF.getButton(DOF.getGroup(DOF.getRoot(), "Input Data Binding"), "&New key...").click();
    WO.setTextField(DOF.getDialog("Key"), DOF.getTextField(DOF.getDialog("Key"), "Name:"), "key1");

    String actual =
        DOF.getLabelByAncestorLine(DOF.getDialog("Key"), "Composite->Composite->Shell->Shell")
            .getProperty("text")
            .toString();
    vpManual(
            "keyduplicate", "Key names must be unique.   The key name key1 already exists.", actual)
        .performTest();
    DOF.getButton(DOF.getDialog("Key"), "Cancel").click();

    // end
    PropertiesView.NewKey("key2,list");
    PropertiesView.clickTab("General");
    String s1 = PropertiesView.verifykeylist();
    System.out.println(s1);
    vpManual("unmatchkey", "", s1).performTest();

    PropertiesView.NewKey("key3,string");
    PropertiesView.clickTab("General");
    String s2 = PropertiesView.verifykeylist();
    vpManual("matchedkey", "key3,", s2).performTest();
  }
  /**
   * Script Name : <b>CSFO_One2One_Cascade_N_bi_dir_Parent</b> Generated : <b>Sep 15, 2011 3:24:13
   * PM</b> Description : Functional Test Script Original Host : WinNT Version 5.1 Build 2600 (S)
   *
   * @since 2011/09/15
   * @author FANFEI
   */
  public void testMain(Object[] args) {
    // TODO Insert code here
    WN.useProject(Cfg.projectName);
    EE.dnd("Database Connections->My Sample Database->sampledb->Tables->wf_ff_a (dba)");
    EE.dnd("Database Connections->My Sample Database->sampledb->Tables->wf_ff_b (dba)");
    WN.createRelationship(
        new Relationship()
            .startParameter(WN.mboPath(Cfg.projectName, "Wf_ff_a"))
            .target("Wf_ff_b")
            .mapping("aid,aid")
            .composite("true")
            .bidirectional("false")
            .type(Relationship.TYPE_OTO));
    WN.createWorkFlow(
        new WorkFlow()
            .startParameter(Cfg.projectName)
            .name("myWF")
            .option(WorkFlow.SP_CLIENT_INIT));
    WorkFlowEditor.dragMbo(Cfg.projectName, "Wf_ff_a");

    vpManual("creen", true, WorkFlowEditor.hasScreen("Wfffa")).performTest();
    vpManual("creen", true, WorkFlowEditor.hasScreen("Wfffaupdateinstance")).performTest();
    vpManual("creen", true, WorkFlowEditor.hasScreen("Wfffadeleteinstance")).performTest();
    vpManual("creen", true, WorkFlowEditor.hasScreen("WfffaDetail")).performTest();
    vpManual("creen", true, WorkFlowEditor.hasScreen("Wfffacreate")).performTest();
    vpManual("creen", true, WorkFlowEditor.hasScreen("WfffbDetail")).performTest();
    vpManual("creen", true, WorkFlowEditor.hasScreen("Wfffbupdateinstance")).performTest();

    vpManual("link", true, WorkFlowEditor.hasLinkBetween("WfffaDetail", "WfffbDetail"))
        .performTest();
    vpManual("link", true, WorkFlowEditor.hasLinkBetween("WfffbDetail", "Wfffbupdateinstance"))
        .performTest();

    // vp1:parentDetail:
    vpManual("hasmenu", true, WorkFlowEditor.hasMenuItemInScreen("WfffaDetail", "Open WfffbDetail"))
        .performTest();
    vpManual(
            "hasmenu",
            true,
            WorkFlowEditor.hasMenuItemInScreen("WfffaDetail", "Open Wfffaupdateinstance"))
        .performTest();
    vpManual(
            "hasmenu",
            true,
            WorkFlowEditor.hasMenuItemInScreen("WfffaDetail", "Open Wfffadeleteinstance"))
        .performTest();
    vpManual(
            "hasmenu",
            true,
            WorkFlowEditor.hasWidgetInScreen("WfffaDetail", new WFEditBox().label("Aid:")))
        .performTest();
    PropertiesView.clickTab("General");
    vpManual(
            "dataBinding",
            "Wf_ff_a_aid_attribKey",
            DOF.getCCombo(DOF.getGroup(DOF.getRoot(), "Input Data Binding")).getProperty("text"))
        .performTest();

    vpManual(
            "hasmenu",
            true,
            WorkFlowEditor.hasWidgetInScreen("WfffaDetail", new WFEditBox().label("Aname:")))
        .performTest();
    PropertiesView.clickTab("General");
    vpManual(
            "dataBinding",
            "Wf_ff_a_aname_attribKey",
            DOF.getCCombo(DOF.getGroup(DOF.getRoot(), "Input Data Binding")).getProperty("text"))
        .performTest();

    // vp2:childDetail:
    vpManual(
            "hasmenu",
            true,
            WorkFlowEditor.hasMenuItemInScreen(
                "WfffbDetail", "Open Screen Wf_ff_b_update_instance"))
        .performTest();
    vpManual(
            "hasmenu",
            true,
            WorkFlowEditor.hasMenuItemInScreen("WfffbDetail", "Wf_ff_b_delete_instance"))
        .performTest();
    vpManual(
            "hasmenu",
            true,
            WorkFlowEditor.hasWidgetInScreen("WfffbDetail", new WFEditBox().label("Bid:")))
        .performTest();
    PropertiesView.clickTab("General");
    vpManual(
            "dataBinding",
            "Wf_ff_b_bid_attribKey",
            DOF.getCCombo(DOF.getGroup(DOF.getRoot(), "Input Data Binding")).getProperty("text"))
        .performTest();

    vpManual(
            "hasmenu",
            true,
            WorkFlowEditor.hasWidgetInScreen("WfffbDetail", new WFEditBox().label("Aid:")))
        .performTest();
    PropertiesView.clickTab("General");
    vpManual(
            "dataBinding",
            "Wf_ff_b_aid_attribKey",
            DOF.getCCombo(DOF.getGroup(DOF.getRoot(), "Input Data Binding")).getProperty("text"))
        .performTest();

    vpManual(
            "hasmenu",
            true,
            WorkFlowEditor.hasWidgetInScreen("WfffbDetail", new WFEditBox().label("Bname:")))
        .performTest();
    PropertiesView.clickTab("General");
    vpManual(
            "dataBinding",
            "Wf_ff_b_bname_attribKey",
            DOF.getCCombo(DOF.getGroup(DOF.getRoot(), "Input Data Binding")).getProperty("text"))
        .performTest();

    // vp3:child_Update:
    vpManual("hasmenu", true, WorkFlowEditor.hasMenuItemInScreen("Wfffbupdateinstance", "Update"))
        .performTest();

    vpManual(
            "hasmenu",
            true,
            WorkFlowEditor.hasWidgetInScreen("Wfffbupdateinstance", new WFEditBox().label("Bid:")))
        .performTest();
    PropertiesView.clickTab("General");
    vpManual(
            "dataBinding",
            "Wf_ff_b_bid_attribKey",
            DOF.getCCombo(DOF.getGroup(DOF.getRoot(), "Input Data Binding")).getProperty("text"))
        .performTest();

    vpManual(
            "hasmenu",
            true,
            WorkFlowEditor.hasWidgetInScreen("Wfffbupdateinstance", new WFEditBox().label("Aid:")))
        .performTest();
    PropertiesView.clickTab("General");
    vpManual(
            "dataBinding",
            "Wf_ff_b_aid_attribKey",
            DOF.getCCombo(DOF.getGroup(DOF.getRoot(), "Input Data Binding")).getProperty("text"))
        .performTest();

    vpManual(
            "hasmenu",
            true,
            WorkFlowEditor.hasWidgetInScreen(
                "Wfffbupdateinstance", new WFEditBox().label("Bname:")))
        .performTest();
    PropertiesView.clickTab("General");
    vpManual(
            "dataBinding",
            "Wf_ff_b_bname_attribKey",
            DOF.getCCombo(DOF.getGroup(DOF.getRoot(), "Input Data Binding")).getProperty("text"))
        .performTest();
  }
Esempio n. 12
0
 private GuiSubitemTestObject tree() {
   return DOF.getTree(dialog());
 }
Esempio n. 13
0
 private TopLevelTestObject dialog() {
   return DOF.getDialog(title);
 }