fbpx

Get your 6-month No-Cost Opt-Out offer for Unlimited software automation!

Method InputBox

Shows InputBox and Returns typed text data

Usage

Function ZAP.InputBox ( 
	String PromptMessage [Optional],
	Boolean CollapseMainWindow [Optional],
	String DefaultResult [Optional]
)

Parameters

PromptMessage (optional)

Type: String

Default value: "Input the text:"

Prompt Message for Input Dialog

CollapseMainWindow (optional)

Type: Boolean

Default value: true

If true it collapses Main ZAPTEST Window when dialog appears

DefaultResult (optional)

Type: String

Default value: Empty String

Default result if user clicks close button

Returns

String with user typed text data

Example

VBScript

username = Zap.InputBox("Please enter username:", true, "DemoUser")
password = Zap.InputPasswordBox("Please enter password:", true, "demo")
Application("Demo").View("DemoView").Object("txtUsername").Type username
Application("Demo").View("DemoView").Object("txtPassword").Type password
Application("Demo").View("DemoView").Object("btnLogin").Click

JavaScript

var username = Zap.InputBox("Please enter username:", true, "DemoUser");
var password = Zap.InputPasswordBox("Please enter password:", true, "demo");
Application("Demo").View("DemoView").Object("txtUsername").Type(username);
Application("Demo").View("DemoView").Object("txtPassword").Type(password);
Application("Demo").View("DemoView").Object("btnLogin").Click();

Documentation Categories

ZAPTEST

FARM

LOAD