Leap year using Run Script

#1

Summary:

This document will explain you how to create a simple Zappy automation task to check whether the year is leap or not.

Leap year – Is a year which has 366 days. The extra day is 29th of February. There is a leap year every four years.

Step 1: Open Demo Zappy file.

Step 2: Click on Input Box action to enter the year.

image

Step 3: Variable with name Year is declared to store the user entered value.

image

Step 4: Click on Set Variable Value. VariableName is ${Year} to refer the declared Variable activity .

To set the VariableValue , click on 3 dots and set the reference of Input Box value’s Value

from Variable.

image

Step 5: Click on Run Script action and set the Script.

image

It will check the enter year is leap or not.

Script is shown below.

image

Step 6: Click on Message Box and set properties.

To set the Text , click on 3 dots and set the reference of Run Script from Variable value ExecutionResult .

image

Step 7: Click on Execute image .

Step 8: Enter year which user want to check then click on Ok .

image

Here result will display in the Message Box,

image

Step 9: You can see “Successfully Executed Task” message from Zappy on successful execution.

image