Forum Discussion

RaMup29's avatar
Occasional Contributor
7 years ago

Groovy Script for stopping the testSteps after User selection

Hi All,


I am looking for a Groovy script to ask the user to Conti next steps or stop it?
if the user selected yes (Conti) then next steps need to be executed, if no (stop) then it should cancel the execution of testSteps.


4 Replies

  • JHunt's avatar
    Community Hero
    if (!UISupport.confirm("Continue?", "Shall we...")) {
        testRunner.cancel("User doesn't want to continue")

    Documentation for UI elements is here:


    If you want the test to be considered failed then instead of testRunner.cancel, use:"User doesn't want to continue")
  • nmrao's avatar
    Champion Level 3
    That will be come hurdle if you wanted to achieve un-attended execution of automated tests.

    What is your use case, by the way?
    • nmrao's avatar
      Champion Level 3
      RaMup29, consider marking the question as "Accept as Solution" if you think that is the best answer and addresses your problem.