public void testSetAppliedWithFileToVisma() throws Exception {
dialogFixture.show(new Dimension(1000, 500));
dialogFixture.comboBox("ComboBoxProductAreaGroup").selectItem("Alle");
dialogFixture.button("ButtonSearch").click();
DialogFixture searchDialog = WindowFinder.findDialog("SearchOrderView")
.using(dialogFixture.robot);
searchDialog.textBox("TextFieldSearch").enterText("70722");
searchDialog.button("ButtonOk").click();
// dialogFixture.table(TableEnum.TABLEPACKAGETAKSTOL.getTableName()).cell(row(0).column(1)).select();
if (!dialogFixture.button("ButtonApply").target.isEnabled()) {
dialogFixture.button("ButtonUnapply").click();
dialogFixture.button("ButtonSearch").click();
searchDialog = WindowFinder.findDialog("SearchOrderView").using(
dialogFixture.robot);
searchDialog.textBox("TextFieldSearch").enterText("70722");
searchDialog.button("ButtonOk").click();
}
dialogFixture.button("ButtonApply").requireEnabled();
dialogFixture.button("ButtonUnapply").requireDisabled();
dialogFixture.button("ButtonApply").click();
DialogFixture articleView = WindowFinder.findDialog(
"ArticlePackageView").using(dialogFixture.robot);
JTableFixture tableFixtureArticles =articleView.table("TableArticles");
int rows=tableFixtureArticles.rowCount();
for (int i = 0; i < rows; i++) {
String test=tableFixtureArticles.cell(row(i).column(1)).value();
if("false".equalsIgnoreCase(test)){
tableFixtureArticles.cell(row(i).column(1)).click();
}
}
articleView.button("ButtonOk").click();
File file = new File("visma/70722_.edi");
assertEquals(true, file.exists());
FileUtils.forceDelete(file);