public Window getMainWindow() {
cnt = false;
final Window[] result = new Window[3];
WindowInterceptor.init(new MainClassTrigger(PosApplication.class, new
String[0]))
.process(new WindowHandler(){
public Trigger process(Window window) throws Exception{
result[0]=window;
window.getButton("Ok").click(); //1st window login preset to SuperUser
return window.getButton("Ok").triggerClick(); //2nd window Client is preset to GardenAdmin and StoreCentral
}
})
.process(new WindowHandler(){
public Trigger process(Window window) throws Exception{
result[1]=window; //2 button pressed, with values passed from FitnesseStory script
window.getButton(selected).click();
window.getTextBox("BPartner").setText(bpartner);
window.getTextBox("BPartner").pressKey(Key.ENTER);
window.getButton("Plus").click();
window.getButton(selected2).click();
return window.getButton("Payment").triggerClick(); //
}
})
.process(new WindowHandler(){
public Trigger process(Window window) throws Exception{
result[2]=window;
return window.getButton("Ok").triggerClick(); //
}
})
.run();
return result[1];
} .process(new WindowHandler(){
public Trigger process(Window window) throws Exception{
result[1]=window; //2 button pressed, with values passed from FitnesseStory script
window.getButton(selected).click();
window.getButton("New").click();
window.getButton("History").click(); //
window.getButton("Delete").click(); //deleting empty order
window.getButton("History").click(); //
window.getButton("Delete").click(); //deleting non-empty order
return window.getButton("Logout").triggerClick();
}
}) WindowInterceptor.init(new MainClassTrigger(PosApplication.class, new String[0]))
.process(new WindowHandler(){
public Trigger process(Window window) throws Exception{
result[0]=window;
//red1 - start of login dialog, commencing login sequence...
window.getTextBox("userTextField").setText("SuperUser");
window.getPasswordField("passwordField").setPassword("System");
window.getButton("Ok").click(); //1st window login preset to SuperUser
window.getComboBox("orgCombo").select("Store Central");
window.getButton("Ok").click(); //2nd window Client is preset to GardenAdmin and StoreCentral
return window.getButton("Cancel").triggerClick();
}
}) red1 wrote:I was accessing its mercurial path (hg.openbravopos) which turned empty. Anyway i will try that link. Thanks.
Users browsing this forum: No registered users and 0 guests