Skip to main content

Automation Property Files

Client Property File

This file refers to a test .properties file with Window and Component details. If you want to run the properties file 'posNextGen1024x768.properties', the value for the autConfigPropertyFileName property in Create Launch would be 'posNextGen1024x768'. The '.properties' extension is appended for you.

If you need to include multiple property files you can use parameter autConfigPropertyFileNames.

Ex: If you need to include “abc.properties” and “def.properties” then parameter value in Create Launch would be “abc, def“. If the same key is available in both files then precedence will be given to the key in last file in comma separated list.

Window Details

In client property file, entry for the Window details is defined in following format :

Window Name = Inspected Window Id

  • Window name : Starts with prefix WINDOW_ . Must be in all uppercase and the spaces are replaced with _ (underscore).

  • Inspected Window Id : This can be found by inspecting the page (Refer Window Inspector section for more details).

Example :

WINDOW_SELECT_TENDER=Point-of-Sale Application:Point-of-Sale Application:Select Tender Pos/Tender/DoTender SelectTender NextGen1024x768/Pos/Tender/SelectTender

To use this window, you can pass "Select Tender" as the window name from your cucumber step.

Example :

And user presses "OK" button and "Select Tender" page shown

Pop up Windows and Prompts

There is a special condition when it comes to pop-up windows and prompts.

When defining the component ID for these windows, make sure to add the prefix “**\ **“ (backslash and two spaces) before the actual component ID.

Example :

WINDOW_DAY_START_ACKNOWLEDGE_PROMPT=\  Pos/Status/InteractiveDayStart  AcknowledgeComplete  NextGen1024x768/Message/PopUpModalOK
WINDOW_UNKNOWN_PRODUCT_NOT_ALLOWED=\ Pos/Product/SellUnknownProductDataCapture UnknownProductNotAllowed NextGen1024x768/ErrorMessage/ModalOK

Component details

Component ID can be found by inspecting a component (Refer Window Inspector section for more details). Component details are defined in the following format in a client property file.

COMPONENT_INPUT_BOX=InputBox
COMPONENT_RECEIPT=Receipt
COMPONENT_BUTTON_1=Button1
COMPONENT_BUTTON_2=Button2
COMPONENT_BUTTON_3=Button3

Component name starts with prefix COMPONENT_ and the name of the component is all uppercase and the spaces are replaced with _ (underscore).

Example :

COMPONENT_INPUT_BOX=InputBox

To use this component, you can pass "Input Box" as the component name from your cucumber step.

Example :

And user enters "10.00" into "Input Box" field

Mapping Cucumber Labels to Client Property Entries

For Windows

Example :

And user presses "OK" button and "Select Tender" page shown

In the above cucumber script step, the window name ("Select Tender"), will be mapped in the Client property file as follows.

  1. Spaces in the name are replaced with underscores ( _ ), and the entire name is converted to uppercase.
  2. A prefix will be added as "WINDOW_"

Therefore mapped Window name = WINDOW_SELECT_TENDER

The script will then search for the corresponding inspected window ID, matching the mapped window name in the client property file.

WINDOW_SELECT_TENDER=Point-of-Sale Application:Point-of-Sale Application:Select Tender Pos/Tender/DoTender SelectTender NextGen1024x768/Pos/Tender/SelectTender

For Components

Example :

And user enters "10.00" into "Input Box" field

In the above cucumber script step, the component name ("Input Box"), will be mapped in the Client property file as follows.

  1. Spaces in the name are replaced with underscores ( _ ), and the entire name is converted to uppercase.
  2. A prefix will be added as "COMPONENT_"

Therefore mapped Window name = COMPONENT_INPUT_BOX

The script will then search for the corresponding inspected Component ID, matching the mapped component name in the client property file.

Data Property File

Instead of directly giving the values to cucumber steps, you can tell step to pick data from data file by wrapping data in ${[data]}.

// enter product id 1 directly into input box field
Given user enters "0001" into "Input Box" field

// to get the value 1 from data file
Given user enters "${Product 1}" into "Input Box" field

In data property file, create an entry with same name given to data in cucumber step (eg: Product 1). Change the name all uppercase and replace spaces with _ (underscore)

//All uppercase and replace spaces with _ (underscore)
PRODUCT_1=0001