Test Language Reference

This chapter discusses:

Click to jump to parent topicObject Types

This section lists each of the PTF object types and defines the actions associated with the object type. The object types are listed in alphabetical order.

Click to jump to parent topicBrowser

These are the actions associated with the Browser object type.

Click to jump to top of pageClick to jump to parent topicClose

Description

Closes the current browser (that is, the one with the execution focus).

Click to jump to top of pageClick to jump to parent topicFrameSet

Description

Sets the focus in a browser frame.

Click to jump to top of pageClick to jump to parent topicStart

Description

Starts the browser instance where the test will be executed. Uses the URL from the selected execution option.

Click to jump to top of pageClick to jump to parent topicStart_Login

Description

Starts the browser instance where the test will be executed and logs into the PeopleSoft application. Uses the URL, user ID, and password from the selected execution option and the language selected in the test Language field.

Click to jump to top of pageClick to jump to parent topicWaitForNew

Description

Waits for a new browser to appear, then continues execution with the new browser.

Specify a timeout value in seconds in the Value column. The default is 10.

Click to jump to parent topicButton

These are the actions associated with the Button object type.

Click to jump to top of pageClick to jump to parent topicClick

Description

The description for this action is in the Common Actions section.

See Click.

Click to jump to top of pageClick to jump to parent topicExists

Description

The description for this action is in the Common Actions section.

See Exists.

Click to jump to top of pageClick to jump to parent topicGet_Property

Description

The description for this action is in the Common Actions section.

See Get_Property.

Click to jump to parent topicChart

These are the actions associated with the Chart object type.

Click to jump to top of pageClick to jump to parent topicChartClick

Description

Performs a click in a chart section.

Parameters

chart=value;

The index for the chart image on the page.

idx=value; url=value; alt=value;

The section recognition string. It can be the section index, the section URL, or the alternative text.

Click to jump to top of pageClick to jump to parent topicGetText

Description

Performs a click in a chart section.

Parameters

chart=value;

The index for the chart image on the page.

idx=value; url=value; alt=value;

The section recognition string. It can be the section index, the section URL, or the alternative text.

ret=&variable;

The return value.

Example

This is an example of the GetText action for a Chart object type:

Example of GetText action for a Chart object type

Click to jump to parent topicCheckBox

These are the actions associated with the CheckBox object type.

Click to jump to top of pageClick to jump to parent topicExists

Description

The description for this action is in the Common Actions section.

See Exists.

Click to jump to top of pageClick to jump to parent topicGet_Property

Description

The description for this action is in the Common Actions section.

See Get_Property.

Click to jump to top of pageClick to jump to parent topicSet_Value

Description

The description for this action is in the Common Actions section.

See Set_Value.

Click to jump to top of pageClick to jump to parent topicVerify

Description

The description for this action is in the Common Actions section.

See Verify.

Click to jump to parent topicComboBox

These are the actions associated with the ComboBox object type.

Click to jump to top of pageClick to jump to parent topicExists

Description

The description for this action is in the Common Actions section.

See Exists.

Click to jump to top of pageClick to jump to parent topicGet_Property

Description

The description for this action is in the Common Actions section.

See Get_Property.

Click to jump to top of pageClick to jump to parent topicSet_Value

Description

Sets the field value in the ComboBox to the value specified in Value. You can also use this action with the #LIST# reserved word to verify whether items exist in the list.

Example

This example sets the field value to One and verifies that the values Two and Three exist:

See Also

#LIST#.

Click to jump to top of pageClick to jump to parent topicVerify

Description

Compares the value in the browser to the expected value and adds a Pass or Fail log entry for the validation. Use a vertical pipe (|) to separate values to be verified. Use square brackets ([]) to specify which value is expected to be selected.

Example

This example verifies the field value is set to Two and verifies that the values One and Three exist:

Click to jump to parent topicConditional

These are the actions associated with the Conditional object type.

Click to jump to top of pageClick to jump to parent topicIf_Then

Description

Validates the given condition. When it is True, the system executes the lines between the If_Then step and the End_If step.

If_Then supports these logical operators:

<>, >=, <=, >, <, =

Example

This example shows the use of the Conditional construct:

Example of the If_Then conditional construct

Click to jump to top of pageClick to jump to parent topicEnd_If

Description

The close statement of the If_Then construct.

Click to jump to parent topicDataMover

This is the action associated with the DataMover object type.

Click to jump to top of pageClick to jump to parent topicExec

Description

Executes a DataMover script. The output folder will be the one selected for the PeopleSoft Data Mover output folder. If the output folder is not specified, it uses the system temp folder.

Example

This example shows the use of the Exec action:

Example of the DataMover Exec action

Click to jump to parent topicFile

This is the action associated with the File object type.

Click to jump to top of pageClick to jump to parent topicUpload

Description

Uploads a file.

In the Recognition column specify the string to get the object from the page. In the Value column specify a full file pathname.

Example

This example shows the use of the Upload action:

Example of the File Upload action

Click to jump to parent topicHTMLTable

These are the actions associated with the HTMLTable object type.

Click to jump to top of pageClick to jump to parent topicCellClick

Description

Clicks on a specific HTMLTableCell based on the index parameter.

Parameters

index=n/n/n;

The table, row, column index string.

For example:

index=1/2/3;

This function clicks on the third column of the second row of the first table.

Click to jump to top of pageClick to jump to parent topicCellClickOnChkB

Description

Clicks the check box specified in the table cell location based on the index parameter.

Parameters

index=n/n/n;

The table, row, column index string.

For example:

index=1/2/3;

This function clicks on the third column of the second row of the first table.

chkidx=value;

The CheckBox object index inside the cell.

check=value;

check=Y – Select the checkbox.

check=N – Clear the checkbox.

This parameter is optional. The default value is Y.

Click to jump to top of pageClick to jump to parent topicCellClickOnImage

Description

Clicks the image specified in the table cell location based on the index parameter.

Parameters

index=n/n/n;

The table, row, column index string.

For example:

index=1/2/3;

This function clicks on the third column of the second row of the first table.

name=value;

The HTMLImage's NameProp value.

Click to jump to top of pageClick to jump to parent topicCellClickOnLink

Description

Clicks the link specified in the table cell location based on the index parameter.

Parameters

index=n/n/n;

The table, row, column index string.

For example:

index=1/2/3;

This function clicks on the third column of the second row of the first table.

link=value;

The link text value.

Click to jump to top of pageClick to jump to parent topicCellExists

Description

Determines whether a cell exists.

Parameters

index=n/n/n;

The table, row, column index string.

For example:

index=1/2/3;

This function clicks on the third column of the second row of the first table.

ret=&variable

The return value.

True – the cell exists.

False – the cell does not exist.

Click to jump to top of pageClick to jump to parent topicCellGetIndex

Description

Returns a string containing the HTMLTable index, row, and column of the value specified in the text parameter.

Parameters

text=value;

The text to look for on the page.

equal=value;

equal=true performs an exact match on the text to search for. This is the default for this optional parameter.

equal=false uses a LIKE statement when performing the search.

ret=&variable

The return value.

Click to jump to top of pageClick to jump to parent topicCellGetValue

Description

Returns the contents of an HTMLTableCell.

Parameters

index=n/n/n;

The table, row, column index string.

For example:

index=1/2/3;

This function clicks on the third column of the second row of the first table.

ret=&variable

The return value.

Click to jump to top of pageClick to jump to parent topicColCount

Description

Returns the number of columns for the HTMLTable row.

Parameters

table=value;

The table index.

row=value;

The row index.

ret=&variable

The return value.

Click to jump to top of pageClick to jump to parent topicRowCount

Description

Returns the number of rows for the HTMLTable.

Parameters

table=value;

The table index.

ret=&variable

The return value.

Example

This is an example of several of the HTMLTable actions:

Click to jump to parent topicImage

These are the actions associated with the Image object type.

Click to jump to top of pageClick to jump to parent topicClick

Description

The description for this action is in the Common Actions section.

See Click.

Click to jump to top of pageClick to jump to parent topicExists

Description

The description for this action is in the Common Actions section.

See Exists.

Click to jump to top of pageClick to jump to parent topicGet_Property

Description

The description for this action is in the Common Actions section.

See Get_Property.

Click to jump to parent topicLink

These are the actions associated with the Link object type.

Click to jump to top of pageClick to jump to parent topicClick

Description

The description for this action is in the Common Actions section.

See Click.

Click to jump to top of pageClick to jump to parent topicExists

Description

The description for this action is in the Common Actions section.

See Exists.

Click to jump to top of pageClick to jump to parent topicGet_Property

Description

The description for this action is in the Common Actions section.

See Get_Property.

Click to jump to parent topicLog

Use the Message, Pass, Warning, and Fail log actions to write entries to the execution log.

Text specified in the Recognition field is written to the log and is displayed as a line in the tree view and in the Message field in the Details pane. Text in the Value field is written to the log and is displayed in the Details field in the Details pane when the corresponding line is selected in the tree view.

Use the Snapshot action to capture a screen image.

These are the actions to add entries to the execution log.

Click to jump to top of pageClick to jump to parent topicFail

Description

Logs an entry with a status of Fail.

Click to jump to top of pageClick to jump to parent topicMessage

Description

Logs a message with a status of Info.

Click to jump to top of pageClick to jump to parent topicPass

Description

Logs an entry with a status of Pass.

Click to jump to top of pageClick to jump to parent topicSnapShot

Description

Logs an entry with an image of the current screen.

Click to jump to top of pageClick to jump to parent topicWarning

Description

Logs an entry with a status of Warning.

Example

This example shows how the Log actions log text:

This log example shows how text from the Log actions appears in the Log Viewer:

Click to jump to parent topicLongText

These are the actions associated with the LongText object type.

Click to jump to top of pageClick to jump to parent topicExists

Description

The description for this action is in the Common Actions section.

See Exists.

Click to jump to top of pageClick to jump to parent topicGet_Property

Description

The description for this action is in the Common Actions section.

See Get_Property.

Click to jump to top of pageClick to jump to parent topicSet_Value

Description

The description for this action is in the Common Actions section.

See Set_Value.

Click to jump to top of pageClick to jump to parent topicVerify

Description

The description for this action is in the Common Actions section.

See Verify.

Click to jump to parent topicMultiSelect

These are the actions associated with the MultiSelect object type.

Click to jump to top of pageClick to jump to parent topicExists

Description

The description for this action is in the Common Actions section.

See Exists.

Click to jump to top of pageClick to jump to parent topicGet_Property

Description

The description for this action is in the Common Actions section.

See Get_Property.

Click to jump to top of pageClick to jump to parent topicSet_Value

Description

The description for this action is in the Common Actions section.

See Set_Value.

Click to jump to top of pageClick to jump to parent topicVerify

Description

The description for this action is in the Common Actions section.

See Verify.

Click to jump to parent topicPage

These are the actions associated with the Page object type.

Click to jump to top of pageClick to jump to parent topicExpand

Description

Attempts to expand all the collapsed sections on the current page.

Click to jump to top of pageClick to jump to parent topicGo_To

Description

Accesses a page by selecting a page tab. Enter the page name in the Recognition field.

Example

This example shows the use of the Go_To action:

Click to jump to top of pageClick to jump to parent topicPrompt

Description

Opens a component based on the MENU.COMPONENT.MARKET recognition string.

If the component has a search page, use the Page.PromptOk action to close the search page.

In the Value field, you must provide an action. The valid values are:

Click to jump to top of pageClick to jump to parent topicPromptOK

Description

Closes the search page. If the specified action is update, this action selects the first returned value.

Example

This example shows the use of the Prompt and Prompt OK actions:

Click to jump to top of pageClick to jump to parent topicSave

Description

Attempts to save the current page. This action checks for the SkipSavePage flag in the execution options.

Click to jump to parent topicProcess

The Process actions run processes through Process Scheduler.

Click to jump to top of pageClick to jump to parent topicRun

Description

Runs a Process Scheduler process.

Parameters

prcname=value;

The process name.

prctype=value;

The process type.

wait=value;

True - the test waits for the process to finish.

False - the test does not wait for the process to finish.

The default is False.

outtype=value;

The process output type.

outformat=value;

The process output format.

outfile=value;

The process output file.

expected=value;

Defines the expected status for the process when it completes.

Expected status is based on status values returned in the Run Status column in Process Monitor.

For example:

expected=Success; expected=No Success;

If the final status equals the expected status, then a Pass is logged; if not, a Fail is logged.

ret=&variable

The return value.

True - the process completed successfully.

False - the process did not complete successfully.

Example

This example shows the use of the Run action to run a process:

Example of the Run action

Click to jump to top of pageClick to jump to parent topicRun_Def

Description

Changes the default behavior of the run process. This action only supports one parameter per step. For multiple parameters, you will need multiple steps.

Parameters

RunButton=value;

The run button name.

ProcessMonitorLink=value;

The Process Monitor link name.

ProcessInstanceField=value;

The field where the process instance ID will appear.

QueuedTimeout=value;

Overwrites the local option value (in minutes).

PostingTimeout=value;

Overwrites the local option value (in minutes).

ProcessingTimeout=value;

Overwrites the local option value (in minutes).

ExceptionTimeout=value;

General timeout, in minutes, for all the states that are not in the local option.

QueuedResult=value;

Overwrites the local option value. Valid values are FAIL and WARN.

PostingResult=value;

Overwrites the local option value. Valid values are FAIL and WARN.

See Also

Configuring Local Options.

Click to jump to parent topicPwd

These are the actions associated with the Pwd object type.

Click to jump to top of pageClick to jump to parent topicExists

Description

The description for this action is in the Common Actions section.

See Exists.

Click to jump to top of pageClick to jump to parent topicSet_Value

Description

The description for this action is in the Common Actions section.

See Set_Value.

Click to jump to parent topicQuery

This is the action associated with the Query object type.

Click to jump to top of pageClick to jump to parent topicExec

Description

Runs a query in PeopleSoft Query and downloads the results.

Parameters

outFolder=value;

The folder where the result will be saved. If this parameter is missing, the system will use the value in the local option.

outFormat=value;

The file format that will be used to download the result file. If this parameter is missing, the system will use the value in the local option.

param=value;

The list of comma delimited values for all the query parameters.

Example

This example shows the use of the Query Exec action:

Example of the Query Exec action

Click to jump to parent topicRadio

These are the actions associated with the Radio object type.

Click to jump to top of pageClick to jump to parent topicExists

Description

The value property is required to validate whether a radio button exists on the page. It can be defined in the Recognition field using value=value or in the Value field.

See Exists.

Example

In the following example, in the first step the value property is set in the Value field. In the second step, the value is set in the Recognition field using the Value= parameter.

The following example shows how to use either the Value field or the value= parameter to identify a radio button:

Example of setting the value for a Radio object type

Click to jump to top of pageClick to jump to parent topicGet_Property

Description

The description for this action is in the Common Actions section.

See Get_Property.

Click to jump to top of pageClick to jump to parent topicSet_Value

Description

The description for this action is in the Common Actions section.

See Set_Value.

Click to jump to top of pageClick to jump to parent topicVerify

Description

The description for this action is in the Common Actions section.

See Verify.

Click to jump to parent topicScroll

These are the actions associated with the Scroll object type.

The Scroll ID field is required for all Scroll action types.

See Also

Incorporating Scroll Handling.

Click to jump to top of pageClick to jump to parent topicAction

Description

Takes an action based on the row specified by Key_Set.

Parameters

ret=&variable;

The return value. It returns the position index for the field acted upon, based on the row identified using Key_Set.

Specify the action in the Value column.

This table lists the valid values for the Action action.

Value

Description

ins

Insert a row. If the current row is the first row, then use the existing row.

ins+

Always insert a row.

delins

Delete all rows, and then insert into the first row.

del

Delete the row specified by the Key_Set action.

delall

Delete all rows. No further processing.

delsel

Look for the row and delete it. Do not add a fail if the row does not exist.

upd

Find a specified row to work with. If the row is not found, insert a new row or use the first row for the first time.

upd+

Find a specified row to work with. If is not found, always insert a new row.

sel

Find a row specified by the Key_Set action.

find

Use the scroll Find link. Format: find=text_to_find

not

Check that the row is not in the scroll. Add a Fail to the log if the row is found.

Click to jump to top of pageClick to jump to parent topicDefinition

Description

Use the Definition action to overwrite the default name object of scroll buttons and the scroll parent.

Parameters

def=value;

One of the definition values. Example:

def=parent;

The following table gives valid values for the def parameter.

type=value;

The object type for the new action.

Example 1:

type=Image;

Example 2:

type=PushButton;

value=value;

The scroll parent variable or the new object recognition string.

Example 1:

value=&Scr1;

Example 2:

value=Name=$ICField3$newm$0$$img$0;

This table lists the valid values for the def parameter:

Value

Description

add

Overwrite the Add new row button.

del

Overwrite the Delete row button.

next

Overwrite the Next button.

prev

Overwrite the Previous button.

first

Overwrite the First button.

last

Overwrite the Last button.

parent

Reassign the parent for a specific scroll area.

Click to jump to top of pageClick to jump to parent topicKey_Set

Description

Defines the set of keys that define a scroll.

Specify the object type and field name as parameters. Specify the key value in the Value column.

Parameters

type=value;

The object type for the key field.

Example:

type=Text;

name=value;

The name of the key field.

Click to jump to top of pageClick to jump to parent topicReset

Description

Resets all the scroll variables and closes the scroll section in the log.

Click to jump to top of pageClick to jump to parent topicRowCount

Description

Returns the number of rows for the defined scroll.

Example

These examples show the use of scroll actions:

This example uses the Definition action with the def=Add parameter to assign the Add action to the image $ICField3$newm$0$$mg$0:

Example of a Definition action with def=Add parameter

In this example the Definition action with a def=parent parameter reassigns the parent:

Example of the Definition action with the def=parent paramenter

Click to jump to parent topicSpan

These are the actions associated with the Span object type.

Click to jump to top of pageClick to jump to parent topicClick

Description

The description for this action is in the Common Actions section.

See Click.

Click to jump to top of pageClick to jump to parent topicExists

Description

The description for this action is in the Common Actions section.

See Exists.

Click to jump to top of pageClick to jump to parent topicGet_Property

Description

The description for this action is in the Common Actions section.

See Get_Property.

Click to jump to top of pageClick to jump to parent topicMouseOver

Description

Fires the mouseover event to show a popup page. Enter the page name in the Recognition field.

See Also

Using Pop-up Pages.

Click to jump to top of pageClick to jump to parent topicMouseOverClose

Description

Fires the mouseout event to close a popup page. Enter the page name in the Recognition field.

See Also

Using Pop-up Pages.

Example

The following examples show how MouseOver and MouseOverClose can be used with popup pages.

To validate a field value in a mouseover popup window:

  1. Click and drag the Field Check button and hover over the field with a popup window.

  2. Wait until the popup window appears.

  3. Move the cursor to the field you want to check, then release the mouse button.

  4. PTF Recorder generates the following steps:

To record an action for an object inside a mouseover popup window:

  1. Click and drag the Field Check button and hover over the field with a popup window.

  2. Wait until the popup window appears, then release the mouse button.

  3. Perform the action you want to record, such as clicking a URL link.

  4. PTF Recorder generates the following steps:

Click to jump to top of pageClick to jump to parent topicVerify

Description

The description for this action is in the Common Actions section.

See Verify.

Example

This step validates a Span object that contains informational text:

Example of the Span.Verify action

Click to jump to parent topicTest

This is the action associated with the Test object type.

Click to jump to top of pageClick to jump to parent topicExec

Description

Calls another test or library.

Specify the test name in the Recognition field and the test case name in the Value field.

Example

This step calls the test 851_USER_PROFILE_01:

Example of the Test Exec action

Click to jump to parent topicText

These are the actions associated with the Text object type.

Click to jump to top of pageClick to jump to parent topicExists

Description

The description for this action is in the Common Actions section.

See Exists.

Click to jump to top of pageClick to jump to parent topicGet_Property

Description

The description for this action is in the Common Actions section.

See Get_Property.

Click to jump to top of pageClick to jump to parent topicSet_Value

Description

The description for this action is in the Common Actions section.

See Set_Value.

Click to jump to top of pageClick to jump to parent topicVerify

Description

The description for this action is in the Common Actions section.

See Verify.

Click to jump to parent topicVariable

This is the action associated with the Variable object type.

Click to jump to top of pageClick to jump to parent topicSet_Value

Description

Assigns a value to the given variable.

Example

This example shows how to set a variable and how to use variables in other steps:

Example of the Set_Value action

See Also

Variables.

Click to jump to parent topicCommon Actions

The actions in this section can be used with multiple object types. The object types that support the action are listed with each action.

Click to jump to top of pageClick to jump to parent topicClick

Description

Performs a mouse click on the specified object.

This is the list of objects that support this action:

Example

This example shows the use of the Click action with a Button object and a Link object:

Click to jump to top of pageClick to jump to parent topicExists

Description

Checks whether the object exists on the page.

This is the list of objects that support this action:

Parameters

ret=&variable;

ret=true – the object exists

ret=false – the object does not exist

expected=value

Specify expected=true or expected=false. Logs a Pass or Fail based on whether the ret parameter matches the expected parameter.

Example

This example shows the use of the Exists action:

Click to jump to top of pageClick to jump to parent topicGet_Property

Description

Gets the property value based on the prop=value parameter and assigns it to the variable in ret=&variable.

Use the HTML Browser feature of the Message tool to identify the properties and values of an object.

See Using the Message Tool.

Some objects have properties that are different from what you might expect.

For example:

This is the list of objects that support this action:

Parameters

prop=value;

The property name.

ret=&variable;

The return value.

Example

This example shows the use of the Get_Property action:

Click to jump to top of pageClick to jump to parent topicSet_Value

Description

Sets the field value in the browser object.

This is the list of objects that support this action:

Example

This is an example of the use of the Set_Value action:

Click to jump to top of pageClick to jump to parent topicVerify

Description

Compares the value in the browser to the expected value, and adds a pass or fail log entry for the validation.

This is the list of objects that support this action:

Example

This is an example of the Verify action:

Click to jump to parent topicReserved Words

This section defines PTF reserved words. The reserved words are listed alphabetically.

Click to jump to top of pageClick to jump to parent topic#CHECK#

Description

The #CHECK# reserved word modifies the behavior of a Set_Value action to be more like a Verify action. This can be useful when you want to set data in a particular field for one test case and verify the data in the same field for a different test case.

Note. If the values are not equal, PTF will always try to update the value (unless the object is display-only). If the values are equal, PTF will not update the value.

Example

For example, a text box could be set and verified with the following two steps:

Example of setting a value and verifying a value in two steps

Suppose, however, that the test calls for using two test cases. The first test case sets the calculation name equal to KUSPTEST. The second test case verifies the value of KUSPTEST.

The test case that sets the value to KUSPTEST would be constructed as shown the first step of the previous example. The test case that verifies the value as KUSPTEST would be constructed as shown in the following example:

Example of setting a value and verifying a value using #CHECK#

Click to jump to top of pageClick to jump to parent topic#DIS#

Description

This reserved word verifies a value and also checks whether the object is display-only. It logs a Fail if the object is not display-only or if the expected value does not match the application value.

If you use #DIS# without a value, then the value is ignored and #DIS# only checks for whether the field is disabled.

This reserved word is useful when, for example, PeopleCode is expected to make an object visible but not editable.

Example

The following example checks whether the Benefit Commencement Date field date is display-only and the value is equal to 07/12/2000:

Example of using #DIS#

Click to jump to top of pageClick to jump to parent topic#DTTM

Description

Similar to #TODAY, the #DTTM reserved word inserts the current date and time into a field in the application.

See Also

#TODAY.

Click to jump to top of pageClick to jump to parent topic#EXIST#

Description

Verifies the existence of a field.

If the field exists in the application, a Pass is logged. If the field is not found, a Fail is logged.

If a value is passed after the closing # and the field exists, PTF tries to set the field to that value.

Example

In this example, the first step checks for whether the Benefit Plan field exists in the application and logs a Fail if it is not found. The second step not only checks for the existence of the field, it attempts to enter the value KUHP into it:

Example of using #EXIST#

See Also

#NOTEXIST#.

Click to jump to top of pageClick to jump to parent topic#FAIL#

Description

This reserved word works the same as #CHECK# but does not update the value after performing the comparison. If a mismatch is found, a Fail is logged; otherwise, a Pass is logged.

You would use #FAIL# rather than #CHECK# when you do not want to update the field if a mismatch exists.

Example

In this example, the PTF test logs a Fail if the Summary Calculation Name field is not equal to KUSPTEST:

Example of #FAIL#

See Also

#WARN#.

Click to jump to top of pageClick to jump to parent topic#LIKEF#

Description

The #LIKEF# and #LIKEW# reserved words are similar to the #FAIL# and #WARN# reserved words except that they look for similar values, not an exact match. If a similar match is not found, #LIKEF# logs a Fail and #LIKEW# logs a Warning.

Similar to the behavior of #FAIL# and #WARN# (and unlike the behavior of #CHECK#), if the comparison fails, PTF does not update the value. The steps only affect the error state of the execution log.

This table details ways #LIKEW# or #LIKEF# can match strings:

Type of Match

Pattern

Match (Log a Pass)

No Match (Log a Fail or Warn)

Multiple characters

a*a

aa, aBa, aBBBa

ABC

Multiple characters

*ab*

abc, AABB, Xab

aZb , bac

Multiple characters

ab*

abcdefg, abc

cab, aab

Special character

a[*]a

a*a

Aaa

Single character

a?a

aaa, a3a, aBa

ABBBa

Single digit

a#a

a0a, a1a, a2a

aaa, a10a

Range of characters

[a-z]

f, p, j

2, &

Outside a range

[!a-z]

9, &, %

b, a

Not a digit

[!0-9]

A, a, &,

0, 1, 9

Combined

a[!b-m]#

~ An9, az0, a99

abc, aj0

Example

Suppose a test requires verification of only the first several characters of a text entry. In the following example, the first step logs a Fail if the first two characters of the Benefit Plan field are not equal to US. The second step logs a Fail unless the first two characters of the Benefit Plan field are equal to US and the last character is equal to 1:

#LIKEF# and #LIKEW# only compare the date text of a date/time value. For example, some fields contain the current date and time. Use the #LIKEF##TODAY* construction to compare just the date portion of a Datetime field and ignore the time portion.

For example:

Example of using #LIKEF##TODAY*

Click to jump to top of pageClick to jump to parent topic#LIKEW#

Description

The #LIKEW# reserved word is used the same as #LIKEF# except it logs a Warning rather than a Fail. For complete details for using #LIKEW# see #LIKEF#.

See Also

#LIKEF#.

Click to jump to top of pageClick to jump to parent topic#LIST#

Description

This reserved word checks the values of a ComboBox. It works with either the full text entries in the combo box or the metadata translation (XLAT) values of the entries.

To check one or more values and then set an item in a drop-down list box, list the items separated by a a vertical pipe (|) and place brackets ([]) around the item that you want to select. If the value in the field is not the same as the value in brackets, PTF logs an error and sets the value in the field to the value in brackets.

Example

This example shows the use of the #LIST# reserved word:

In this example, the first step verifies the existence of items in the list. The second step verifies that the items exist and verifies that Individual is selected.

Example of using #LIST#

This example is similar to the previous example, but it refers to the entries by the metadata translation (XLAT) values rather than the text that actually appears in the combo box:

Example of using #LIST# with translate values

Click to jump to top of pageClick to jump to parent topic#NOTEXIST#

Description

The opposite of the #EXIST# reserved word, #NOTEXIST# verifies that a field does not exist.

If the field does not exist, a Pass is logged. If the field does exist, a Fail is logged.

See Also

#EXIST#.

Click to jump to top of pageClick to jump to parent topic#NOTHING

Description

PTF ignores any step with a Set_Value or Verify action where the Value field is empty, or blank. The #NOTHING reserved word enables you to use SET_VALUE to set a field to blank or select a blank value from a drop-down list box. You can use #NOTHING with a Verify action to verify that a field is blank.

The #NOTHING reserved word does not have a closing pound sign (#). It cannot be used in combination with other reserved words.

Note. Leaving the Value field of a test step blank does not have the same effect as using the #NOTHING reserved word. PTF ignores any Set_Value or Verify action where the Value field is blank.

Example

In the following example, in the first step #NOTHING selects a blank value in the Calculation Reason field and then in the next step it verifies that the field is blank:

Example of using #NOTHING

Click to jump to top of pageClick to jump to parent topic#PREFIX#

Description

The #PREFIX# reserved word substitutes the text in the Prefix field in the Test Editor for the #PREFIX# string in the Value field.

This substitution is useful when developing a test that adds new data. It enables you to modify each new added record slightly so that the test is able to successfully add unique data each time the test is executed.

Example

Suppose you entered add in the Prefix field, as in this example:

The following test step would enter the value addUSER into the User ID field:

Example of using #PREFIX#

Note. The #PREFIX# reserved word can only be used at the beginning of the text in the Value field.

Click to jump to top of pageClick to jump to parent topic#TODAY

Description

Substitutes the current date.

Note. The #TODAY reserved word does not have a closing pound sign (#). It cannot be followed by another reserved word.

Example

Suppose you have the following test instruction:

12. Enter the current date into the Event Date field.

The following step sets the value of the Event Date field to the date at the moment of test execution:

Example of using #TODAY

You can use the + or – operators in conjunction with the #TODAY reserved word to reference a date in the future or past. In this example, the test verifies that the calculation event date is 10 days in the future:

Example of using #TODAY+10

Click to jump to top of pageClick to jump to parent topic#WARN#

Description

This reserved word works the same as #CHECK# but does not update the value after performing the comparison. If a mismatch is found, a Warning is logged; otherwise, a Pass is logged.

You would use #WARN# rather than #CHECK# when you do not want to update the field if a mismatch exists.

See Also

#FAIL#.

Click to jump to parent topicFunctions

This section lists the PTF functions.

Click to jump to top of pageClick to jump to parent topicSum

Syntax

Sum(text, sum_value, index_part, delimiter)

Description

Sum works with the HTMLTable indexes. You can also use Sum to perform a simple numeric sum.

Parameters

Text

The HTMLTable index string, such as 2/5/4. This string is the return value of CellGetIndex.

See CellGetIndex.

Sum_Value

The value that you want to add or subtract. The default action is addition.

Index_part

The index on the section that will be modified.

Delimiter

The character that delimits each section in the text value.

Example

The follow table presents examples of using Sum.

Expression

Result

Sum(2/5/4, 2, 1, /)

4/5/4

2 is added to the first part of the string.

Sum(2/5/4, -1, 3, /)

2/5/3

Sum(&index, -4, 3, /)

4 is subtracted from the third part of the string in the variable &index.

Sum(&Dumvar, 2, 1, )

This is an example of a simple numeric sum.

2 is added to the value in &Dumvar. Assuming the value in &Dumvar is 3, the result would be 5.

Note that the trailing comma is required.