14 Oracle Application Framework Functional Module

This chapter provides a complete listing and reference for the methods in the OpenScript OAFService Class of Oracle Application Framework Module Application Programming Interface (API).

These API provide OpenScript the ability to record the Partial Page Refresh (PPR) Page Sync event of EBS/Forms web pages during functional testing.

14.1 Oracle Application Framework API Reference

The following section provides an alphabetical listing of the methods in the OpenScript OAFService API.

14.1.1 Alphabetical Command Listing

The following table lists the OAFService API methods in alphabetical order.

Table 14-1 List of OAFService Methods

Method Description

oaf.waitPPR

Waits until the class name 'OALoading' disappears or a timeout occurs.

oaf.waitFramePPR

Waits until class name 'OALoading' in a frame/iframe disappears or a timeout occurs.


The following sections provide detailed reference information for each method in the OAFService Class of Oracle Application Framework Module Application Programming Interface.

oaf.waitPPR

Waits until the class name 'OALoading' disappears or a timeout occurs. This function repeatedly checks OALoading class name until 'OALoading' is not present.

Enable the Oracle Application Framework (OAF) Functional Test module in the Oracle EBS/Forms script Properties.

Format

The oaf.waitPPR method has the following command format(s):

oaf.waitPPR(windowPath);

oaf.waitPPR(recId, windowPath);

oaf.waitPPR(windowPath, timeoutMillis);

oaf.waitPPR(windowPath, timeoutMillis, durationMillisBetweenEachCheck, consecutiveNum, delayMillisAfterWait);

Command Parameters

windowPath

a String specifying the object path.

recId

the ID of a previously recorded navigation, used for comparison purposes.

timeoutMillis

a Long specifying the timeout in milliseconds.

durationMillisBetweenEachCheck

a Long specifying the delay between each check.

consecutiveNum

an Integer value specifying the number of checks. Must be greater or equal to 1.

delayMillisAfterWait

a Long specifying the delay in milliseconds after finished waiting.

Throws

Exception

on any error.

OAFWaitPPRTimeoutException

if timeout occurs.

Example

The function checks 'OALoading' class name in the <body> element every 500 milliseconds. If there are 3 consecutive checks that 'OALoading' is not present (that means the page has finished loading), the function stops, waits 1000 milliseconds and then returns. Otherwise, a timeout occurs after 80000 milliseconds.

oaf.waitPPR("/web:window[@index='0' or @title='Suppliers']",80000,500,3,1000);;

oaf.waitFramePPR

Waits until class name 'OALoading' in a frame/ iframe disappears or a timeout occurs. This function repeatedly checks OALoading class name in an iframe until OALoading is not present. The frame/iframe is specified by a document path.

Enable the Oracle Application Framework (OAF) Functional Test module in the Oracle EBS/Forms script Properties.

Format

The oaf.waitFramePPR method has the following command format(s):

oaf.waitFramePPR(documentPath);

oaf.waitFramePPR(recId, documentPath);

oaf.waitFramePPR(documentPath, timeoutMillis);

oaf.waitFramePPR(documentPath, timeoutMillis, durationMillisBetweenEachCheck, consecutiveNum, delayMillisAfterWait);

Command Parameters

documentPath

a String specifying the document path of the iframe.

recId

the ID of a previously recorded navigation, used for comparison purposes.

timeoutMillis

a Long specifying the timeout in milliseconds.

durationMillisBetweenEachCheck

a Long specifying the delay between each check.

consecutiveNum

an Integer value specifying the number of checks. Must be greater or equal to 1.

delayMillisAfterWait

a Long specifying the delay in milliseconds after finished waiting.

Throws

Exception

on any error.

OAFWaitPPRTimeoutException

if timeout occurs.

Example

The function checks 'OALoading' class name in the frame/iframe's <body> element every 300 milliseconds. If there are 5 consecutive checks that 'OALoading' is not present (that means the page has finished loading), the function stops, waits 2000 milliseconds and then returns. Otherwise, a timeout occurs after 30000 milliseconds.

oaf.waitPPR("/web:window[@index='0' or @title='Oracle iProcurement: Shop']" +
 "/web:document[@index='5' or @name='null']",30000,300,5,2000);