Insert human event

Hello,

because sometimes the test cases are too much complexe and require too much time to set all the possibilities, I would like to insert in the test script a human event i.e. the script will pause until the human event is completed. Then the script restarts with the following tasks until the end (or another human event).

Thank you for your help.

That new code works great ! Many thanks !

Hi Luong, I am able to create a pop-up but it did not make a pause of the tests script.

Could you please tell the groovy command that make frozen the script and once the button of the popup clicked, the script resume ?

Many thanks for your help !

This is my current customKeyword:
@Keyword
**def** Popup(String actionHumaine){
**new** SwingBuilder().edt {
frame(
title: 'Frame', size: [300, 100], show: **true**) {
borderLayout()
textlabel = label(
text: actionHumaine, constraints: BL.**_NORTH_**)
button(
text:'Reprendre Automate', ,constraints:BL.**_SOUTH_**)
}
}
}

Hello,

no answer … perhaps my issue is not clearly described.

When dropdown boxes are contextual or some fields appear according to the value of other fields, there could be too much combinations to set in the test case. So what I would like is, during the execution of the script, to insert a pause so a human can set some values himself. Once completed, the script resume.

Does anybody know if this possible ?

The code maybe like this:

@Keyword
def Popup(String actionHumaine){
boolean resume = false
new SwingBuilder().edt {
frame(
title: 'Frame', size: [300, 100], show: true) {
borderLayout()
textlabel = label(
text: actionHumaine, constraints: BL.NORTH)
button(
text:'Reprendre Automate', constraints:BL.SOUTH, actionPerformed:{event -> resume = true })
}
}

while (!resume) {
//wait for resuming
Thread.sleep(5)
}
}

You can add a CustomKeyword that pop-ups a dialog with a “Resume” button. When the human actions complete, you can press the resume button then your script will continue running.

Please take a look at [Groovy SwingBuilder](http://groovy-lang.org/swing.html).

Thanks.