Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • SoapUI Cookbook
  • Toc
  • feedback
SoapUI Cookbook

SoapUI Cookbook

By : Rupert Anderson
4 (5)
close
SoapUI Cookbook

SoapUI Cookbook

4 (5)
By: Rupert Anderson

Overview of this book

This book is aimed at developers and technical testers who are looking for a quick way to take their SoapUI skills and understanding to the next level. Even if you are new to SoapUI but have basic Java skills and a reasonable grasp of RESTFul and Soap web services, then you should have no problem making use of this book.
Table of Contents (13 chapters)
close
12
Index

Prompting for user input with the UISupport class


When developing extensions, plugins, and scripts, you may need to display alerts, prompts, and confirmations. The UISupport class can help with this! It's a rather large class with a lot of capabilities in addition to those mentioned. In this recipe, we'll look at a few examples to get you started. It's quick and easy to use!

Getting ready

The UISupportExamplesProject project containing the Groovy examples from this recipe can be found in the chapter 11 samples.

How to do it...

As a quick demonstration, we'll just use a Groovy TestStep to run a few examples. The examples will also work in plugin extensions.

The first thing we need to do is import the class:

import com.eviware.soapui.support.UISupport

To display an info popup, enter and run:

UISupport.showInfoMessage("Hello from UISupport!")

To display a question prompt with default value and capture the answer as a String:

String answer = UISupport.prompt("Question","Title","default value")

For a prompt...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete