예제 #1
0
  @Test
  @InstallFile("samples/basicInstall/basicInstall.xml")
  public void testBasicInstall() throws Exception {
    File installPath = HelperTestMethod.prepareInstallation(installData);
    // Lang picker
    HelperTestMethod.clickDefaultLang(languageDialog);

    installerFrameFixture =
        HelperTestMethod.prepareFrameFixture(installerFrame, installerController);
    Thread.sleep(600);
    // Hello panel
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    Thread.sleep(600);
    // Info Panel
    installerFrameFixture.textBox(GuiId.INFO_PANEL_TEXT_AREA.id).requireText("A readme file ...");
    installerFrameFixture.button(GuiId.BUTTON_PREV.id).requireVisible();
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    installerFrameFixture.button(GuiId.BUTTON_PREV.id).requireEnabled();
    Thread.sleep(300);
    // Licence Panel
    installerFrameFixture
        .textBox(GuiId.LICENCE_TEXT_AREA.id)
        .requireText("(Consider it as a licence file ...)");
    installerFrameFixture.radioButton(GuiId.LICENCE_NO_RADIO.id).requireSelected();
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).requireDisabled();
    installerFrameFixture.radioButton(GuiId.LICENCE_YES_RADIO.id).click();
    Thread.sleep(300);
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    // Target Panel
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    Thread.sleep(1000);
    installerFrameFixture.optionPane().requireWarningMessage();
    installerFrameFixture.optionPane().okButton().click();
    // Packs Panel
    Thread.sleep(300);
    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    // Install Panel
    HelperTestMethod.waitAndCheckInstallation(installData, installPath);

    installerFrameFixture.button(GuiId.BUTTON_NEXT.id).click();
    // Finish panel
    installerFrameFixture.button(GuiId.FINISH_PANEL_AUTO_BUTTON.id).click();
    Thread.sleep(800);
    installerFrameFixture
        .fileChooser(GuiId.FINISH_PANEL_FILE_CHOOSER.id)
        .fileNameTextBox()
        .enterText("auto.xml");
    Thread.sleep(300);
    installerFrameFixture.fileChooser(GuiId.FINISH_PANEL_FILE_CHOOSER.id).approve();
    assertThat(new File(installPath, "auto.xml").exists(), Is.is(true));
    //        installerFrameFixture.button(GuiId.BUTTON_QUIT.id).click();
  }
예제 #2
0
 protected void requireInformationMessage(String msg) {
   window.optionPane().requireInformationMessage().requireMessage(msg);
 }
예제 #3
0
 protected void clickYes() {
   window.optionPane().buttonWithText(YES).click();
 }
예제 #4
0
 protected void clickOk() {
   window.optionPane().buttonWithText(OK).click();
 }
예제 #5
0
 protected void clickNo() {
   window.optionPane().buttonWithText(NO).click();
 }
예제 #6
0
 protected void clickCancel() {
   window.optionPane().buttonWithText(CANCEL).click();
 }
예제 #7
0
 protected void requireQuestion(String msg) {
   window.optionPane().requireQuestionMessage().requireMessage(msg);
 }
예제 #8
0
 protected void requireWarning(String msg) {
   window.optionPane().requireWarningMessage().requireMessage(msg);
 }