Share this page

# nca_set_iteration_offset

Session Functions

Sets an offset for an object ID.

    void nca_set_iteration_offset( int offset );

offset | The offset of the ID.

The nca_set_iteration_offset function sets an offset value for the ID number of an object. In normal recording for Oracle NCA scripts , VuGen records the name of each object (setting record=names in the start page). If your version does not support the record=names flag, VuGen generates a new ID number for each object. When you run multiple iterations of the script , each opening of an object generates a new ID number. Therefore, when you replay a script, the ID number for a particular object will not match the ID for the same object after the first iteration, causing the test to fail.

To prevent this failure, you can use the nca_set_iteration_offset function to indicate the offset of the object. This determines that at every interval of the offset (e.g., every 25 object IDs), the same object returns.

To determine the offset, you execute the script with an extended log. Review the extended log and locate a unique description or marker at the first and second locations of the object. Subtract the first object ID from the second object ID to obtain the offset value.

## Return Values

No value returned.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

In the following example, the nca_set_iteration_offset function sets an offset value of 3.

    nca_set_iteration_offset(3);
    nca_set_window( "ACME Steel" );
    nca_flex_press_lov("ACME Steel", "Entity", "");

    nca_set_window( "Entity" );
    nca_lov_retrieve_items("Entity",1,8);
    nca_lov_select_item("Entity", "3");

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: