12 Oracle EBS/Forms Functional Module

This chapter provides a complete listing and reference for the methods in the OpenScript FormsService Class of Forms Functional Module Application Programming Interface (API).

12.1 FormsService API Reference

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

12.1.1 Alphabetical Command Listing

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

Table 12-1 List of FormsService Methods

Method Description

forms.alertDialog

Identifies an Oracle Forms alertDialog object by its path.

forms.appletAdapter

Identifies an Oracle Forms AppletAdapter object by its applet name.

forms.attribute

Construct property data of a single attribute.

forms.attributes

Utility function to return a list of property tests.

forms.blockScroller

Identifies an Oracle Forms blockScroller object by its path.

forms.button

Identifies an Oracle Forms Button object by its path.

forms.calendar

Identifies an Oracle Forms calendar object by its path.

forms.captureScreenshot

Capture the screen shot at runtime.

forms.cell

Constructs the test data of a table cell.

forms.cells

Constructs the list of table cell tests.

forms.checkBox

Identifies an Oracle Forms checkBox object by its path.

forms.choiceBox

Identifies an Oracle Forms choiceBox object by its path.

forms.close

Close the running forms.

forms.comboBox

Identifies an Oracle Forms comboBox object by its path.

forms.editBox

Identifies an Oracle Forms editBox object by its path.

forms.editorDialog

Identifies an Oracle Forms EditorDialog object by its path.

forms.flexWindow

Identifies an Oracle Forms FlexWindow object by its path.

forms.getAllObjects

Gets all forms objects.

forms.getStatusBarCount

Gets the bar count shown in the bottom of the forms client.

forms.getStatusBarErrorCode

Gets the error code shown in the status bar of the forms client.

forms.getStatusBarItem

Gets the item shown in the status bar of forms client.

forms.getStatusBarItemCount

Gets the item count shown in the status bar of forms client.

forms.getStatusBarMessage

Gets the message shown in the status bar of forms client.

forms.getStatusBarRecordInfo

Gets the record info shown in the status bar of the forms client.

forms.hGridApp

Identifies an Oracle Forms HGridApp object by its path.

forms.helpDialog

Identifies an Oracle Forms helpDialog object by its path.

forms.imageItem

Identifies an Oracle Forms imageItem object by its path.

forms.infoBox

Identifies an Oracle Forms infoBox object by its path.

forms.list

Identifies an Oracle Forms list object by its path.

forms.listOfValues

Identifies an Oracle Forms listOfValues object by its path.

forms.logonDialog

Identifies an Oracle Forms logonDialog object by its path.

forms.otsHGrid

Identifies an Oracle Forms otsHGrid object by its path.

forms.radioButton

Identifies an Oracle Forms radioButton object by its path.

forms.responseBox

Identifies an Oracle Forms responseBox object by its path.

forms.schedulingDataClient

Identifies an Oracle Forms schedulingDataClient object by its path.

forms.spreadTable

Identifies an Oracle Forms spreadTable object by its path.

forms.statusBar

Identifies an Oracle Forms StatusBar object by its recorded ID and path.

forms.tab

Identifies an Oracle Forms tab object by its path.

forms.tableBox

Identifies an Oracle Forms tableBox object by its path.

forms.textField

Identifies an Oracle Forms textField object by its path.

forms.tree

Identifies an Oracle Forms tree object by its path.

forms.treeList

Identifies an Oracle Forms treeList object by its path.

forms.window

Identifies an Oracle Forms window object by its path.


The following sections provide detailed reference information for each method and enum in the FormsService Class of Forms Functional Module Application Programming Interface.


forms.alertDialog

Identifies an Oracle Forms alertDialog object by its path.

Format

The forms.alertDialog method has the following command format(s):

forms.alertDialog(path);

forms.alertDialog(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms alertDialog. For example, //forms:alertDialog. Must not be null. Since it is only possible to show one alertDialog in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the alertDialog object.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms alertDialog.

Example

Performs an action on an Oracle Forms alertDialog object specified by its recorded ID and path.

String msg=forms.alertDialog(128, "//forms:alertDialog")
 .getAlertMessage();
info("alertDialog: " + msg);
forms.alertDialog(128, "//forms:alertDialog")
 .clickNo();

forms.appletAdapter

Identifies an Oracle Forms AppletAdapter object by its applet name.

Format

The forms.appletAdapter method has the following command format(s):

forms.appletAdapter(path);

forms.appletAdapter(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the applet name to identify the forms appletAdater. For example, //forms:appletAdapter[(@appletName='NAV_CONTROLS_EXPAND_ALL_0')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms AppletAdapter.

Example

Performs an action on an Oracle Forms appletAdapter object specified by its recorded ID and applet name.

forms.appletAdapter(10, "//forms:appletAdapter[" +
 "(@appletName='NAV_CONTROLS_EXPAND_ALL_0')]")
 .execute("value", "prompt");

forms.attribute

Construct property data of a single attribute.

Format

The forms.attribute method has the following command format(s):

forms.attribute(property, expectedValue, operator);

Command Parameters

property

a String specifying the property name.

expectedValue

a String specifying the expected value.

operator

a TestOperator enum defining the type and the match approach of the data.

Returns

a PropertyTest object.

Example

Specify the attributes of an object.

forms.textField(248, "//forms:textField[" +
 "(@name='STUB_APPLICATION_NAME_0')]")
 .setFocus();
forms.textField(249,"//forms:textField[" +
 "(@name='STUB_APPLICATION_NAME_0')]")
 .setText("abc");
forms.textField("//forms:textField[" +
 "(@name='STUB_APPLICATION_NAME_0')]")
 .verifyAttributes("test1",forms.attributes(
   forms.attribute("enabled", "true", 
     TestOperator.StringExact), 
   forms.attribute("text", "Sales", 
     TestOperator.StringExact),
   forms.attribute("visible", "true",
     TestOperator.StringExact),
   forms.attribute("name", "STUB_APPLICATION_NAME_0", 
     TestOperator.StringExact),
   forms.attribute("showing", "true", 
     TestOperator.StringExact),
   forms.attribute("prompt", "Application", 
     TestOperator.StringExact),
   forms.attribute("editable", "true", 
     TestOperator.StringExact)));

forms.attributes

Utility function to return a list of property tests.

Format

The forms.attributes method has the following command format(s):

forms.attributes(tests);

Command Parameters

tests

an array of PropertyTest attribute objects specifying all the tests included in the forms object test.

Returns

a new PropertyTest[].

Example

Specify the attributes of an object.

forms.textField(248, "//forms:textField[" +
 "(@name='STUB_APPLICATION_NAME_0')]")
 .setFocus();
forms.textField(249,"//forms:textField[" +
 "(@name='STUB_APPLICATION_NAME_0')]")
 .setText("abc");
forms.textField("//forms:textField[" +
 "(@name='STUB_APPLICATION_NAME_0')]")
 .verifyAttributes("test1",forms.attributes(
   forms.attribute("enabled", "true", 
     TestOperator.StringExact), 
   forms.attribute("text", "Sales", 
     TestOperator.StringExact),
   forms.attribute("visible", "true",
     TestOperator.StringExact),
   forms.attribute("name", "STUB_APPLICATION_NAME_0", 
     TestOperator.StringExact),
   forms.attribute("showing", "true", 
     TestOperator.StringExact),
   forms.attribute("prompt", "Application", 
     TestOperator.StringExact),
   forms.attribute("editable", "true", 
     TestOperator.StringExact)));

forms.blockScroller

Identifies an Oracle Forms blockScroller object by its path.

Format

The forms.blockScroller method has the following command format(s):

forms.blockScroller(path);

forms.blockScroller(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms blockScroller. For example, //forms:blockScroller. Must not be null. Without further notice, this method only works properly when only one blockScroller exists in a window.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms blockScroller.

Example

Performs an action on an Oracle Forms blockScroller object specified by its recorded ID and path.

int maxNum=forms.blockScroller(50, "//forms:blockScroller")
 .getMaximum();
int minNum=forms.blockScroller50, "//forms:blockScroller")
 .getMinimum();
int value=forms.blockScroller(50, "//forms:blockScroller")
 .getValue();
info("maxNum:"+maxNum+" minNum:"+minNum+" value8:"+value);
forms.blockScroller(50, "//forms:blockScroller")
 .scrollDown();
int scrollDownValue=forms.blockScroller(50, "//forms:blockScroller")
 .getValue();
forms.blockScroller(50, "//forms:blockScroller")
 .scrollUp();
int scrollUpValue=forms.blockScroller(50, "//forms:blockScroller")
 .getValue();
   if(value!=8)warn("scroll to error!");
   if(scrollDownValue!=9)warn("scroll to error!");
   if(scrollUpValue!=8)warn("scroll up error!");

forms.button

Identifies an Oracle Forms Button object by its path.

Format

The forms.button method has the following command format(s):

forms.button(path);

forms.button(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms button. For example, //forms:button[(@name='NAV_CONTROLS_EXPAND_ALL_0')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms Button object.

Example

Performs an action on an Oracle Forms Button object specified by its recorded ID and path.

forms.button(32, "//forms:button[(@name='CALENDAR_OK_0')]")
 .setFocus();
String accName1=forms.button(32, "//forms:button[(@name='CALENDAR_OK_0')]")
 .getAccessibleName();
String label1=forms.button(32, "//forms:button[(@name='CALENDAR_OK_0')]")
 .getLabel();
info("accssibleName: " + accName1);
info("Label: " + label1);

forms.calendar

Identifies an Oracle Forms calendar object by its path.

Format

The forms.calendar method has the following command format(s):

forms.calendar(path);

forms.calendar(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms calendar. For example, //forms:calendar. Must not be null. Since it is only possible to show one calendar in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the calendar object.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms calendar.

Example

Performs an action on an Oracle Forms calendar object specified by its recorded ID and path.

forms.textField(111, "//forms:textField[" +
 "(@name='GROUPS_EXPENDITURE_ENDING_DATE_0')]")
 .openDialog();
forms.button(114, "//forms:button[" +
 "(@name='CALENDAR_OK_0')]")
 .setFocus();
forms.calendar(115, "//forms:calendar")
 .enter("06-JAN-2011");
forms.window(118, "//forms:window[" +
 "(@name='GROUPS_DETAIL')]")
 .activate(true);
forms.textField(119, "//forms:textField[" +
 "(@name='GROUPS_EXPENDITURE_ENDING_DATE_0')]")
 .openDialog();
forms.button(122, "//forms:button[" +
 "(@name='CALENDAR_OK_0')]")
 .setFocus();
forms.calendar(123, "//forms:calendar")
 .clickOk();

forms.captureScreenshot

Capture the screen shot at runtime. Please refer to {@link #captureScreenshot(Integer,String)}.

Format

The forms.captureScreenshot method has the following command format(s):

forms.captureScreenshot( );

forms.captureScreenshot(recid);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Example

Captures the screen shot at runtime.

forms.captureScreenshot(103);

forms.cell

Constructs the test data of a table cell.

Format

The forms.cell method has the following command format(s):

forms.cell(row, column, expectedValue, operator);

Command Parameters

row

a 1-based index value specifying the row number.

column

a 1-based index value specifying the column number.

expectedValue

a String specifying the expected value of the property.

operator

a TestOperator enum that defines the type and the match approach of the data.

Returns

a CellTest object with the specified row, column, expectedValue, and operator.

Example

Adds a table test for specifying exact match or wildcard match for individual cells.

forms.otsHGrid("//forms:otsHGrid[(@name='ASTEVENR_CONF_HGRID_ITEMS_0')]" +
 .assertCells("MyTableTest",
   forms.cells(forms.cell(1, 1, "Ticker ",TestOperator.StringExact),  
     forms.cell(1, 2,"Company ", TestOperator.StringExact), 
     forms.cell(2, 1, "ORCL*", TestOperator.StringWildCard), 
     forms.cell(2, 2, "Oracle", TestOperator.StringExact)));

forms.cells

Constructs the list of table cell tests.

Format

The forms.cells method has the following command format(s):

forms.cells(tests);

Command Parameters

tests

a list of table cells.

Returns

a CellTest[] with the specified cells.

Example

Adds a table test for specifying exact match or wildcard match for each cell.

forms.otsHGrid("//forms:otsHGrid[(@name='ASTEVENR_CONF_HGRID_ITEMS_0')]" +
 .assertCells("MyTableTest",
   web.cells(forms.cell(1, 1, "Ticker ",TestOperator.StringExact),  
     forms.cell(1, 2,"Company ", TestOperator.StringExact), 
     forms.cell(2, 1, "ORCL*", TestOperator.StringWildCard), 
     forms.cell(2, 2, "Oracle", TestOperator.StringExact)));

forms.checkBox

Identifies an Oracle Forms checkBox object by its path.

Format

The forms.checkBox method has the following command format(s):

forms.checkBox(path);

forms.checkBox(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms checkBox. For example, //forms:checkBox[(@name='MTL_SYSTEM_ITEMS_INVENTORY_ITEM_FLAG_MIR_0')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms checkBox.

Example

Performs an action on an Oracle Forms checkBox object specified by its recorded ID and path.

forms.checkBox(35, "//forms:checkBox[" +
 "(@name='JOBS_QF_SHOW_STAGES_0')]")
 .check(true);
forms.checkBox(35, "//forms:checkBox[" +
 "(@name='JOBS_QF_SHOW_STAGES_0')]")
 .verifyAttribute("checkbox status", "state", 
  "true", TestOperator.StringExact);
if( !forms.checkBox(35, "//forms:checkBox[" +
 "(@name='JOBS_QF_SHOW_STAGES_0')]")
 .isSelected())warn("check statement error");
String accessibleName=forms.checkBox(35, "//forms:checkBox[" +
 "(@name='JOBS_QF_SHOW_STAGES_0')]")
 .getAccessibleName();
String label=forms.checkBox(35, "//forms:checkBox[" +
 "(@name='JOBS_QF_SHOW_STAGES_0')]")
 .getLabel();
//output accessible name and label
info("check box's acccessible name: " + accessibleName);
info("check box's label: " + label);

forms.choiceBox

Identifies an Oracle Forms choiceBox object by its path.

Format

The forms.choiceBox method has the following command format(s):

forms.choiceBox(path);

forms.choiceBox(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms choiceBox. For example, //forms:choiceBox. Must not be null. Since it is only possible to show one choiceBox in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the choiceBox object.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms choiceBox.

Example

Performs an action on an Oracle Forms choiceBox object specified by its recorded ID and path.

forms.choiceBox(147, "//forms:choiceBox").clickButton("OK");

forms.close

Close the running forms. Please refer to forms.close

Format

The forms.close method has the following command format(s):

forms.close( );

forms.close(recid);

Command Parameters

recid

the ID of a previously recorded element which is another corresponding element to this, holding all the info recorded.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Example

Closes the running forms.

forms.close(144);

forms.comboBox

Identifies an Oracle Forms comboBox object by its path.

Format

The forms.comboBox method has the following command format(s):

forms.comboBox(path);

forms.comboBox(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms comboBox. For example, //forms:comboBox[(@name='ALL_WIDGETS_LIST508_0')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms comboBox.

Example

Performs an action on an Oracle Forms comboBox object specified by its recorded ID and path.

//get accessible name and count
String accessName=forms.comboBox(20, "//forms:comboBox[" +
 "(@name='ALL_WIDGETS_LIST508_0')]")
 .getAccessibleName();
int itemCount=forms.comboBox(20, "//forms:comboBox[" +
 "(@name='ALL_WIDGETS_LIST508_0')]")
 .getItemCount();
info("accessible Name: " + accessName);
info("item count: " + itemCount);
forms.comboBox(20, "//forms:comboBox[" +
 "(@name='ALL_WIDGETS_LIST508_0')]")
 .setFocus();
forms.comboBox(20, "//forms:comboBox[" +
 "(@name='ALL_WIDGETS_LIST508_0')]")
 .setText("text");
String itemValue = forms.comboBox(20, "//forms:comboBox[" +
 "(@name='ALL_WIDGETS_LIST508_0')]")
 .getItemValue("");
info(itemValue);

forms.editBox

Identifies an Oracle Forms editBox object by its path.

Format

The forms.editBox method has the following command format(s):

forms.editBox(path);

forms.editBox(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms editBox. For example, //forms:calendar. Must not be null. Since it is only possible to show one editBox in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the editBox object.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms editBox.

Example

Performs an action on an Oracle Forms editBox object specified by its recorded ID and path.

forms.window(65, "//forms:window[(@name='GROUPS_DETAIL')]")
 .selectMenu("Help|About Oracle Applications...");
forms.editBox(68, "//forms:editBox").clickOk();
String text1 = forms.editBox(68, "//forms:editBox")
 .getText();
info("editBox text: " + text1);

forms.editorDialog

Identifies an Oracle Forms EditorDialog object by its path.

Format

The forms.editorDialog method has the following command format(s):

forms.editorDialog(path);

forms.editorDialog(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms editorDialog. For example, //forms:editorDialog. Must not be null. Since it is only possible to show one editorDialog in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the editorDialog object.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms editorDialog.

Example

Performs an action on an Oracle Forms editorDialog object specified by its recorded ID and path.

forms.editorDialog(31, "//forms:editorDialog")
 .setText("4500217");
forms.editorDialog(32, "//forms:editorDialog")
 .clickOk();

forms.flexWindow

Identifies an Oracle Forms FlexWindow object by its path.

Format

The forms.flexWindow method has the following command format(s):

forms.flexWindow(path);

forms.flexWindow(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms flexWindow. For example, //forms:flexWindow. Must not be null. Since it is only possible to show one flexWindow in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the flexWindow object.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms flexWindow.

Example

Performs an action on an Oracle Forms FlexWindow object specified by its recorded ID and path.

forms.textField(156, "//forms:textField[" +
 "(@name='LINES_ACCOUNTING_FLEXFIELD_0')]")
 .openDialog();
forms.flexWindow(159, "//forms:flexWindow")
 .setTextAndClickOk("Account Alias", "", 
 "01-000-2225-0000-000");

forms.getAllObjects

Gets all forms objects.

Format

The forms.getAllObjects method has the following command format(s):

forms.getAllObjects( );

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

all objects in XML format.

Example

Gets all forms objects.

String objXML = forms.getAllObjects();
info("Forms objects: " + objXML);

forms.getStatusBarCount

Gets the bar count shown in the bottom of the forms client.

Format

The forms.getStatusBarCount method has the following command format(s):

forms.getStatusBarCount( );

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the bar count.

Example

Gets the status bar count.

for(int i=0;i<forms.getStatusBarCount();i++)
 for(int j=0;j>forms.getStatusBarItemCount(i);j++)
   {
   info("get status bar "+ i+" item count:"+forms.getStatusBarItemCount(i));
   info("get status bar item("+i+","+j+"):"+forms.getStatusBarItem(i, j));      
   }

forms.getStatusBarErrorCode

Gets the error code shown in the status bar of the forms client.

Format

The forms.getStatusBarErrorCode method has the following command format(s):

forms.getStatusBarErrorCode( );

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the error code.

Example

Gets the status bar error code.

info("get Status Bar error code: " + forms.getStatusBarErrorCode());

forms.getStatusBarItem

Gets the item shown in the status bar of forms client.

Format

The forms.getStatusBarItem method has the following command format(s):

forms.getStatusBarItem(barIndex, barItemIndex);

Command Parameters

barIndex

the index of the status bar starting from 0.

barItemIndex

the item index of the status bar starting from 0.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the item.

Example

Gets the status bar item.

for(int i=0;i<forms.getStatusBarCount();i++)
 for(int j=0;j>forms.getStatusBarItemCount(i);j++)
   {
   info("get status bar "+ i+" item count:"+forms.getStatusBarItemCount(i));
   info("get status bar item("+i+","+j+"):"+forms.getStatusBarItem(i, j));    
   }

forms.getStatusBarItemCount

Gets the item count shown in the status bar of forms client.

Format

The forms.getStatusBarItemCount method has the following command format(s):

forms.getStatusBarItemCount(index);

Command Parameters

index

the index of status bar starting from 0.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the item count.

Example

Gets the status bar item count.

for(int i=0;i<forms.getStatusBarCount();i++)
 for(int j=0;j>forms.getStatusBarItemCount(i);j++)
   {
   info("get status bar "+ i+" item count:"+forms.getStatusBarItemCount(i));
   info("get status bar item("+i+","+j+"):"+forms.getStatusBarItem(i, j));
   }

forms.getStatusBarMessage

Gets the message shown in the status bar of forms client.

Format

The forms.getStatusBarMessage method has the following command format(s):

forms.getStatusBarMessage( );

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the message.

Example

Gets the status bar message.

info("Status Bar message: " + forms.getStatusBarMessage());

forms.getStatusBarRecordInfo

Gets the record info shown in the status bar of the forms client.

Format

The forms.getStatusBarRecordInfo method has the following command format(s):

forms.getStatusBarRecordInfo( );

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the record info.

Example

Gets the status bar record info.

info("get Status Bar record info: " + forms.getStatusBarRecordInfo());

forms.helpDialog

Identifies an Oracle Forms helpDialog object by its path.

Format

The forms.helpDialog method has the following command format(s):

forms.helpDialog(path);

forms.helpDialog(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms helpDialog. For example, //forms:helpDialog. Must not be null. Since it is only possible to show one helpDialog in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the helpDialog object.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms helpDialog.

Example

Performs an action on an Oracle Forms helpDialog object specified by its recorded ID and path.

forms.helpDialog(74, "//forms:helpDialog").clickOk();

forms.hGridApp

Identifies an Oracle Forms HGridApp object by its path.

Format

The forms.hGridApp method has the following command format(s):

forms.hGridApp(path);

forms.hGridApp(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms HGridApp. For example, //hGridApp[@name='IEU_HGRID_IEU_HGRID_0']. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms HGridApp.

Example

Performs an action on an Oracle Forms HGridApp object specified by its recorded ID and path.

forms.hGridApp(43, "//forms:hGridApp[(@name='IEU_HGRID_IEU_HGRID_0')]")
 .selectNode("Delinquent Transactions|Active");

forms.imageItem

Identifies an Oracle Forms imageItem object by its path.

Format

The forms.imageItem method has the following command format(s):

forms.imageItem(path);

forms.imageItem(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms imageItem. For example, //forms:imageItem[(@name='NAV_CONTROLS_EXPAND_ALL_0')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms imageItem.

Example

Performs an action on an Oracle Forms imageItem object specified by its recorded ID and path.

forms.imageItem(100, "//forms:imageItem[" +
 "(@name='NAV_CONTROLS_EXPAND_ALL_0')]")
 .click();

forms.infoBox

Identifies an Oracle Forms infoBox object by its path.

Format

The forms.infoBox method has the following command format(s):

forms.infoBox(path);

forms.infoBox(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms infoBox. For example, //forms:infoBox. Must not be null. Since it is only possible to show one infoBox in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the infoBox object.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms infoBox.

Example

Performs an action on an Oracle Forms infoBox object specified by its recorded ID and path.

forms.infoBox(42, "//forms:infoBox").close();

forms.list

Identifies an Oracle Forms list object by its path.

Format

The forms.list method has the following command format(s):

forms.list(path);

forms.list(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms list. For example, //forms:list[(@name='JTF_SORT_COLUMN1_0')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms list.

Example

Performs an action on an Oracle Forms list object specified by its recorded ID and path.

String accessName=forms.list(25, "//forms:list[" +
 "(@name='GROUPS_SYSTEM_LINKAGE_FUNCTION_0')]")
 .getAccessibleName();
int itemCount=forms.list(25, "//forms:list[" +
 "(@name='GROUPS_SYSTEM_LINKAGE_FUNCTION_0')]")
 .getItemCount();
info("accessible Name: " + accessName);
info("item count: " + itemCount);
//getItemValue
forms.list(25, "//forms:list[" +
 "(@name='GROUPS_SYSTEM_LINKAGE_FUNCTION_0')]")
 .selectItem("Usages");
String itemValue=forms.list(25, "//forms:list[" +
 "(@name='GROUPS_SYSTEM_LINKAGE_FUNCTION_0')]")
 .getItemValue();
info(itemValue);
//isItemInList
boolean isItem=forms.list(25, "//forms:list[" +
 "(@name='GROUPS_SYSTEM_LINKAGE_FUNCTION_0')]")
 .isItemInList("Usages");
if(!isItem)warn("Item not in list");
//isItemSelected
boolean isSelected=forms.list(25, "//forms:list[" +
  "(@name='GROUPS_SYSTEM_LINKAGE_FUNCTION_0')]")
  .isItemSelected("Usages");
if(!isSelected)warn("Item not selected");

forms.listOfValues

Identifies an Oracle Forms listOfValues object by its path.

Format

The forms.listOfValues method has the following command format(s):

forms.listOfValues(path);

forms.listOfValues(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms listOfValues. For example, //forms:listOfValues. Must not be null. Since it is only possible to show one listOfValues in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the listOfValues object.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms listOfValues.

Example

Performs an action on an Oracle Forms listOfValues object specified by its recorded ID and path.

//get item count
int itemcount=forms.listOfValues(20, "//forms:listOfValues")
 .getItemCount();
info("Item count: " + itemcount);
//get text
String text = "";
for(int i=0;i<itemcount;i++)
   {
   text=forms.listOfValues(21, "//forms:listOfValues")
     .getText(i);
   info("Item " + i + "text: " + text);
   }

forms.logonDialog

Identifies an Oracle Forms logonDialog object by its path.

Format

The forms.logonDialog method has the following command format(s):

forms.logonDialog(path);

forms.logonDialog(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms logonDialog. For example, //logonDialog. Must not be null. Since it is only possible to show one logonDialog in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the logonDialog object.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms logonDialog.

Example

Performs an action on an Oracle Forms logonDialog object specified by its recorded ID and path.

forms.logonDialog(10, "//logonDialog")
 .activate(true);
forms.logonDialog(10, "//logonDialog")
 .clickConnect("name", "password", "database");

forms.otsHGrid

Identifies an Oracle Forms otsHGrid object by its path.

Format

The forms.otsHGrid method has the following command format(s):

forms.otsHGrid(path);

forms.otsHGrid(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms otsHGrid. For example, //forms:otsHGrid[(@name='ASTEVENR_CONF_HGRID_ITEMS_0')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms otsHGrid.

Example

Performs an action on an Oracle Forms otsHGrid object specified by its recorded ID and path.

if(forms.otsHGrid(10, "//forms:otsHGrid[(@name='ASTEVENR_CONF_HGRID_ITEMS_0')]")
 .exists()) 
 info("otsHGrid passed!");
else warn("otsHGrid failed!");

forms.radioButton

Identifies an Oracle Forms radioButton object by its path.

Format

The forms.radioButton method has the following command format(s):

forms.radioButton(path);

forms.radioButton(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms radioButton. For example, //forms:radioButton[(@name='EXPENDITURES_TRANSACTION_STATUS_REJECTED_0')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms radioButton.

Example

Performs an action on an Oracle Forms radioButton object specified by its recorded ID and path.

String radioLabel=forms.radioButton(24,"//forms:radioButton[" +
 "(@name='JOBS_QF_WHICH_JOBS_MY_UNCOMPLETED_0')]")
 .getLabel();
boolean isSelected=forms.radioButton(24, "//forms:radioButton[" +
 "(@name='JOBS_QF_WHICH_JOBS_MY_UNCOMPLETED_0')]")
 .isSelected();
info("radio label:"+radioLabel+" selected:"+isSelected);
if(isSelected)warn("select error!");
forms.radioButton(24, "//forms:radioButton[" +
 "(@name='JOBS_QF_WHICH_JOBS_MY_UNCOMPLETED_0')]")
 .select();

forms.responseBox

Identifies an Oracle Forms responseBox object by its path.

Format

The forms.responseBox method has the following command format(s):

forms.responseBox(path);

forms.responseBox(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms responseBox. For example, //forms:responseBox. Must not be null. Since it is only possible to show one responseBox in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the responseBox object.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms responseBox.

Example

Performs an action on an Oracle Forms responseBox object specified by its recorded ID and path.

forms.responseBox(154, "//forms:responseBox")
 .setText("Old Password", "abc");
forms.responseBox(155, "//forms:responseBox")
 .setText("New Password", "xyz");

forms.schedulingDataClient

Identifies an Oracle Forms schedulingDataClient object by its path.

Format

The forms.schedulingDataClient method has the following command format(s):

forms.schedulingDataClient(path);

forms.schedulingDataClient(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms schedulingDataClient. For example, //forms:schedulingDataClient[(@name='GANTT_GANTTBEAN_0')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms schedulingDataClient.

Example

Performs an action on an Oracle Forms schedulingDataClient object specified by its recorded ID and path.

forms.schedulingDataClient(32, "//forms:schedulingDataClient[" +
 "(@name='GANTT_GANTTBEAN_0')]")
 .clickNext();
forms.schedulingDataClient(33, "//forms:schedulingDataClient[" +
 "(@name='GANTT_GANTTBEAN_0')]")
 .clickPrevious();
forms.schedulingDataClient(34, "//forms:schedulingDataClient[" +
 "(@name='GANTT_GANTTBEAN_0')]")
 .clickAssigneeCell(3, 1);

forms.spreadTable

Identifies an Oracle Forms spreadTable object by its path.

Format

The forms.spreadTable method has the following command format(s):

forms.spreadTable(path);

forms.spreadTable(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms spreadTable. For example, //forms:spreadTable[(@name='BLK_INBOX_INBOX_GRID_0')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms spreadTable.

Example

Performs an action on an Oracle Forms spreadTable object specified by its recorded ID and path.

forms.spreadTable(66, "//forms:spreadTable[" +
 "(@name='SR_TASK_GRID_GRID_ITEM_0')]")
 .selectRows(1, 1);
forms.spreadTable(66, "//forms:spreadTable[" +
 "(@name='SR_TASK_GRID_GRID_ITEM_0')]")
 .focusCell(1, 1);
String cellValue=forms.spreadTable(66, "//forms:spreadTable[" +
 "(@name='SR_TASK_GRID_GRID_ITEM_0')]")
 .getCell(1, 2);
forms.spreadTable(66, "//forms:spreadTable[" +
 "(@name='SR_TASK_GRID_GRID_ITEM_0')]")
 .storeCell("testVar", 1, 2);
if(!cellValue.equals("{{testVar}}"))warn("get cell value error");
//test column count and row count
forms.spreadTable(66, "//forms:spreadTable[" +
 "(@name='SR_TASK_GRID_GRID_ITEM_0')]")
 .verifyAttributes("objectTest1", 
   forms.attributes(
     forms.attribute("columnCount", "42", 
       TestOperator.StringExact), 
   forms.attribute("rowCount", "2",
       TestOperator.StringExact)));
forms.spreadTable(66, "//forms:spreadTable[" +
 "(@name='SR_TASK_GRID_GRID_ITEM_0')]")
 .focusRow(1);

forms.statusBar

Identifies an Oracle Forms StatusBar object by its recorded ID and path.

Format

The forms.statusBar method has the following command format(s):

forms.statusBar(path);

forms.statusBar(recid, path);

Command Parameters

path

a String specifying the path to identify the forms statusBar. For example, //forms:statusBar. Must not be null. Since it is only possible to show one statusBar in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the Status Bar object.

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms StatusBar.

Example

Performs an action on an Oracle Forms statusBar object specified by its recorded ID and path.

forms.statusBar(100, "//forms:statusBar")
 .assertText("FormsFT AutoValidation: Verify StatusBar text value",
 "FRM-40400: Transaction complete: 1 records applied and saved.",
 MatchOption.Exact);

forms.tab

Identifies an Oracle Forms tab object by its path.

Format

The forms.tab method has the following command format(s):

forms.tab(path);

forms.tab(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms tab. For example, //forms:tab[(@name='ATTRIBUTE_GROUPS_REGIONS')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms tab.

Example

Performs an action on an Oracle Forms tab object specified by its recorded ID and path.

forms.tab(485, "//forms:tab[" +
 "(@name='FLOWDOWN_TAB')]")
 .select("Terms & Conditions");
String selectedStr=forms.tab(485, "//forms:tab[" +
 "(@name='FLOWDOWN_TAB')]")
 .getSelectedTabLabel();
if(!selectedStr.equals("Terms & Conditions"))
 warn("getSelectedTabLabel() error");
boolean isItem=forms.tab(485, "//forms:tab[" +
 "(@name='FLOWDOWN_TAB')]")
 .isItemInList("Terms & Conditions");
if(!isItem)
 warn("isItemInList(string) error");
boolean isSelected=forms.tab(485, "//forms:tab[" +
 "(@name='FLOWDOWN_TAB')]")
 .isItemSelected("Terms & Conditions");
if(!isSelected)
 warn("isItemSelected(string) error");

forms.tableBox

Identifies an Oracle Forms tableBox object by its path.

Format

The forms.tableBox method has the following command format(s):

forms.tableBox(path);

forms.tableBox(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms tableBox. For example, //forms:tableBox. Must not be null. Since it is only possible to show one tableBox in Oracle Forms at runtime, it is not necessary to specify additional conditions in the path to locate the tableBox object.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms tableBox.

Example

Performs an action on an Oracle Forms tableBox object specified by its recorded ID and path.

forms.tableBox(100, "//forms:tableBox")
 .check(1, 1);
forms.tableBox(100, "//forms:tableBox")
 .clickOk();

forms.textField

Identifies an Oracle Forms textField object by its path.

Format

The forms.textField method has the following command format(s):

forms.textField(path);

forms.textField(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms textField. For example, //forms:textField[(@name='NAVIGATOR_TYPE_0')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms TextField.

Example

Performs an action on an Oracle Forms textField object specified by its recorded ID and path.

forms.textField(248, "//forms:textField[" +
 "(@name='STUB_APPLICATION_NAME_0')]")
 .setFocus();
forms.textField(249,"//forms:textField[" +
 "(@name='STUB_APPLICATION_NAME_0')]")
 .setText("abc");
forms.textField("//forms:textField[" +
 "(@name='STUB_APPLICATION_NAME_0')]")
 .verifyAttributes("test1",forms.attributes(
   forms.attribute("enabled", "true", 
     TestOperator.StringExact), 
   forms.attribute("text", "Sales", 
     TestOperator.StringExact),
   forms.attribute("visible", "true",
     TestOperator.StringExact),
   forms.attribute("name", "STUB_APPLICATION_NAME_0", 
     TestOperator.StringExact),
   forms.attribute("showing", "true", 
     TestOperator.StringExact),
   forms.attribute("prompt", "Application", 
     TestOperator.StringExact),
   forms.attribute("editable", "true", 
     TestOperator.StringExact)));

forms.tree

Identifies an Oracle Forms tree object by its path.

Format

The forms.tree method has the following command format(s):

forms.tree(path);

forms.tree(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms tree. For example, //forms:tree[@accessibleName='Navigator']. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms tree.

Example

Performs an action on an Oracle Forms tree object specified by its recorded ID and path.

forms.tree(24, "//forms:tree[(@name='APPTREE_NAV_TREE_NAVIGATOR_0')]")
 .selectNode("Personal Shortcuts");
forms.list(25, "//forms:list[(@name='APPTREE_VIEW_BY_VIEW_BY_0')]")
 .setFocus();
forms.tree(26, "//forms:tree[(@name='APPTREE_NAV_TREE_NAVIGATOR_0')]")
 .expandNode("People By Name");
forms.tree(27, "//forms:tree[(@name='APPTREE_NAV_TREE_NAVIGATOR_0')]")
 .selectNode("People By Name|A");
forms.tree(28, "//forms:tree[(@name='APPTREE_NAV_TREE_NAVIGATOR_0')]")
 .expandNode("People By Name|B");
forms.tree(29, "//forms:tree[(@name='APPTREE_NAV_TREE_NAVIGATOR_0')]")
 .collapseNode("People By Name|B");

forms.treeList

Identifies an Oracle Forms treeList object by its path.

Format

The forms.treeList method has the following command format(s):

forms.treeList(path);

forms.treeList(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms treeList. For example, //forms:treeList[(@name='NAVIGATOR_LIST_0')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms treeList.

Example

Performs an action on an Oracle Forms treeList object specified by its recorded ID and path.

forms.treeList(79, "//forms:treeList[(@name='NAVIGATOR_LIST_0')]")
 .focusItem("Contract Groups");
forms.treeList(80, "//forms:treeList[(@name='NAVIGATOR_LIST_0')]")
 .selectItem("Contract Groups");

forms.window

Identifies an Oracle Forms window object by its path.

Format

The forms.window method has the following command format(s):

forms.window(path);

forms.window(recid, path);

Command Parameters

recid

Optional the ID of a previously recorded navigation, used for comparison purposes. May be null.

path

a String specifying the path to identify the forms window. For example, //forms:window[(@name='NAVIGATOR')]. Must not be null.

Throws

AbstractScriptException

represents an exception that may be thrown during the execution of a script where the exception should be reported to an end user through the controller.

Returns

the forms window.

Example

Performs an action on an Oracle Forms window object specified by its recorded ID and path.

forms.window(24, "//forms:window[(@name='STUB')]")
 .activate(true);
forms.window(25, "//forms:window[(@name='STUB')]")
 .clickToolBarButton("Save");
forms.statusBar(26, "//forms:statusBar").assertText(
 "FormsFT AutoValidation: Verify StatusBar text value",
 "FRM-40401: No changes to save.", MatchOption.Exact);
forms.window(27, "//forms:window[(@name='STUB')]")
 .selectMenu("File|Print...");
boolean isMenu=forms.window(27, "//forms:window[" +
 "(@name='STUB')]")
 .isMenuEnabled("File|Print...");
if(!isMenu)warn("isMenuEnabled(string) error");
forms.window(28, "//forms:window[(@name='STUB')]")
 .close();