Scroll

These are the actions associated with the Scroll step type.

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

Description

Takes an action based on the row specified by Key_Set. Specify the action in the Value column.

This table lists the valid values for the Action 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 the row 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.

Parameters

Field or Control

Definition

ret=&variable;

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

expected=value;

Optional. Applies only to the find action. If used, PTF writes either a Pass or Fail for the step in the test log based on whether a matching object exists. If this parameter is not included, then only step information is logged during execution.

For example:

expected=true Logs an error when the expected value is not found; logs Passed if found, logs Failed if not found.

expected=false Logs an error when the expected value is found; logs Passed if not found, logs Failed if found.

Description

Use the Definition action to override the default name object of scroll buttons and the scroll parent. This is necessary, for example, when a page uses custom objects (such as links or pushbuttons) to handle conventional scroll actions such as adding or deleting rows from the scroll.

Parameters

Field or Control

Definition

def=value;

The default name object type. Example:

def=PARENT;

Valid def values are:

  • ADD: Overrides the Add new row button.

  • DEL: Overrides the Delete row button.

  • NEXT: Overrides the Next button.

  • PREV: Overrides the Previous button.

  • FIRST: Overrides the First button.

  • LAST: Overrides the Last button.

  • PARENT: Reassigns the parent for a specific scroll area.

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;
start=value;

Used to set the scroll area index when the index is not $0 .

In this example the index will start the scroll index at $1.

def=START;Value=1
skipvalidation=value;

Used to skip the validation if the defined scroll has 1 or multiple rows in the scroll when the user deletes or adds a row to it.

PTF handles scroll validation assuming the new row is added to the bottom of the scroll area. There are many cases where the row is added as the top row which will cause the PTF internal scroll validation to fail after the row is inserted. Use the SKIPVALIDATION to handle this situation.

Example 1:

This example will skip the validation when a single row is inserted or deleted from the scroll area.

def=SKIPVALIDATION;type=SINGLE_ROW

Example 2:

This example will skip the validation if multiple rows have been inserted or deleted from the scroll area.

def=SKIPVALIDATION;type=MULTIPLE_ROW 

Examples

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

Type

Action

Recognition

Parameters

Value

Scroll

Definition

value=Name=$ICField3$newm$0$$mg$0

def=ADD;type=Image

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

Scroll ID

Type

Action

Recognition

Parameters

Value

1

Scroll

Key_Set

Name=PSU_EMP_REVIEW_REVIEW_YEAR

type=Text

2009

1

Scroll

Action

ret=&Scr1

upd

Text

Set_Value

Name=PSU_EMP_REVIEW_REVIEW_DAYS&Scr1

Scroll 1 index variable = &Scroll1

365

2

Scroll

Definition

value=&Scr1

def=PARENT;type=Button

2

Scroll

Key_Set

Name=PSU_EMP_RVW_RVR_REVIEWER_ID

type=ComboBox

00013

2

Scroll

Action

ret=&Scr2

upd

ComboBox

Set_Value

Name=PSU_EMP_RVW_RVR_REVIEWER_TYPE&Scr2

S

Description

Defines each key field of a scroll. Use multiple Key_Set steps for scrolls with multiple key fields.

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

Parameters

Field or Control

Definition

type=value;

The step type for the key field.

Example:

type=Text;
name=value;

The name of the key field.

Example

This example illustrates using Key_Set and Action:

Scroll ID

Type

Action

Recognition

Parameters

Value

1

Scroll

Key_Set

Name=PSC_SCR_REC01_PSE_KEY_LVL1

type=Text

ROW1

1

Scroll

Action

ret=&Scr1

upd

Text

Verify

Name=PSC_SCR_REC01_PSE_KEY_LVL&Scr1

ROW1

ComboBox

Set_Value

Name=PSC_SCR_REC01_PSE_KEY_COMBO&Scr1

type=Text

second

Text

Set_Value

Name=PSC_SCR_REC01_CON_CHAR_01&Scr1

updated

Description

Closes a modal grid.

Description

Opens a modal grid.

Description

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

Description

Returns the number of rows for the defined scroll.

Example

This example illustrates using the RowCount action to perform a loop:

Scroll ID

Type

Action

Recognition

Parameters

Value

Browser

Start_Login

Browser

FrameSet

TargetContent

Page

Prompt

MAINTAIN_SECURITY.USERMAINT.GBL

update

Text

Set_Value

Name=PSOPRDEFN_SRCH_OPRID

STU1

Page

PromptOk

Page

Go_To

Roles

1

Scroll

Key_Set

name=PSROLEUSER_VW_ROLENAME

type=Text

Dummy

1

Scroll

RowCount

ret=&Count

Variable

Set_Value

&EndCount

Add(&Count|-1)

Loop

For

&RowCount =0 to &EndCount

Text

Get_Property

name=PSROLEUSER_VW_ROLENAME$&RowCount

prop=Value;ret=&Value

Log

Message

The role of row number &RowCount is &Value

Loop

Next