Oracle® Functional Testing OpenScript Programmer's Reference Release 13.3.0.1 E37832-12 |
|
![]() Previous |
![]() Next |
This chapter provides a complete listing and reference for the methods in the OpenScript JET (Oracle JavaScript Extension Toolkit) Class of the OpenScript JET Module Application Programming Interface (API).
The following section provides an alphabetical listing of the methods in the OpenScript JET API.
The following table lists the OpenScript JET API methods in alphabetical order.
Table 18-1 List of JET Methods
Method | Description |
---|---|
|
Identifies a JETAccordion by its recorded ID and path. |
|
Identifies a JETButton by its recorded ID and path. |
|
Identifies a JETChart by its recorded ID and path. |
|
Identifies a JETCheckboxset by its recorded ID and path. |
|
Identifies a JETCollapsible by its recorded ID and path. |
|
Identifies a JETColorPalette by its recorded ID and path. |
|
Identifies a JETColorSpectrum by its recorded ID and path. |
|
Identifies a JETCombobox by its recorded ID and path. |
|
Identifies a JETDataGrid by its recorded ID and path. |
|
Identifies a JETDiagram by its recorded ID and path. |
|
Identifies a JETDialGauge by its recorded ID and path. |
|
Identifies a JETDialog by its recorded ID and path. |
|
Identifies a JETFilmStrip by its recorded ID and path. |
|
Find a component in a specified location by CSS selector. |
|
Find a list of components in a specified location by CSS selector. |
|
Identifies a JETGantt by its recorded ID and path. |
|
Return the JET component if the DOMElement |
|
Identifies a JETIndexer by its recorded ID and path. |
|
Identifies a JETInputDate by its recorded ID and path. |
|
Identifies a JETInputDateTime by its recorded ID and path. |
|
Identifies a JETInputNumber by its recorded ID and path. |
|
Identifies a JETInputPassword by its recorded ID and path. |
|
Identifies a JETInputSearch by its recorded ID and path. |
|
Identifies a JETInputText by its recorded ID and path. |
|
Identifies a JETInputTime by its recorded ID and path. |
|
Check if busyContext is enabled. |
|
Identifies a JETLedGauge by its recorded ID and path. |
|
Identifies a JETLegend by its recorded ID and path. |
|
Identifies a JETListView by its recorded ID and path. |
|
Identifies a JETMenu by its recorded ID and path. |
|
Identifies a JETNavigationList by its recorded ID and path. |
|
Identifies a JETNBox by its recorded ID and path. |
|
Identifies a JETPagingControl by its recorded ID and path. |
|
Identifies a JETPopup by its recorded ID and path. |
|
Identifies a JETProgressbar by its recorded ID and path. |
|
Identifies a JETRadioset by its recorded ID and path. |
|
Identifies a JETRatingGauge by its recorded ID and path. |
|
Identifies a JETSelect by its recorded ID and path. |
|
Identifies a JETSlider by its recorded ID and path. |
|
Identifies a JETStatusMeterGauge by its recorded ID and path. |
|
Identifies a JETSunburst by its recorded ID and path. |
|
Identifies a JETSwitch by its recorded ID and path. |
|
Identifies a JETTable by its recorded ID and path. |
|
Identifies a JETTabs by its recorded ID and path. |
|
Identifies a JETTagCloud by its recorded ID and path. |
|
Identifies a JETTextArea by its recorded ID and path. |
|
Identifies a JETThematicMap by its recorded ID and path. |
|
Identifies a JETTrain by its recorded ID and path. |
|
Identifies a JETTree by its recorded ID and path. |
|
Identifies a JETTreemap by its recorded ID and path. |
|
Wait for the JET page to be loaded. |
The following sections provide detailed reference information for each method in the JET Class of the OpenScript JET Module Application Programming Interface.
Identifies a JETAccordion by its recorded ID and path.
Format
The jet.accordion method has the following command format(s):
jet.accordion(path);
jet.accordion(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETButton by its recorded ID and path.
Format
The jet.button method has the following command format(s):
jet.button(path);
jet.button(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETChart by its recorded ID and path.
Format
The jet.chart method has the following command format(s):
jet.chart(path);
jet.chart(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Throws
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
Performs an action on an JETChart object specified by its recorded ID and path.
int groupCount = jet.chart(11,
"/web:window[@index='0' or @title='Area Chart - Default']" +
"/web:document[@index='0']" +
"/web:JETChart[@id='areaChart']")
.getGroupCount();
info("groupCount: " + Integer.toString(groupCount));
Identifies a JETCheckboxset by its recorded ID and path.
Format
The jet.checkboxset method has the following command format(s):
jet.checkboxset(path);
jet.checkboxset(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETCollapsible by its recorded ID and path.
Format
The jet.collapsible method has the following command format(s):
jet.collapsible(path);
jet.collapsible(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETColorPalette by its recorded ID and path. This component is supported in jet version 4.0.0 and above.
Format
The jet.colorPalette method has the following command format(s):
jet.colorPalette(path);
jet.colorPalette(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Throws
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
Performs an action on an JETColorPalette object specified by its recorded ID and path.
Color color = jet.colorPalette(11,
"/web:window[@index='0' or @title='Color - Default']" +
"/web:document[@index='0']" +
"/web:JETColorPalette[@id='color']")
.getColor();
info("Red: " + Integer.toString(color.getRed()));
Identifies a JETColorSpectrum by its recorded ID and path. This component is supported in jet version 4.0.0 and above.
Format
The jet.colorSpectrum method has the following command format(s):
jet.colorSpectrum(path);
jet.colorSpectrum(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Throws
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
Performs an action on an JETColorSpectrum object specified by its recorded ID and path.
Color color = jet.colorSpectrum(11,
"/web:window[@index='0' or @title='Color - Default']" +
"/web:document[@index='0']" +
"/web:JETColorSpectrum[@id='color']")
.getColor();
info("Red: " + Integer.toString(color.getRed()));
Identifies a JETCombobox by its recorded ID and path.
Format
The jet.combobox method has the following command format(s):
jet.combobox(path);
jet.combobox(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETDataGrid by its recorded ID and path.
Format
The jet.dataGrid method has the following command format(s):
jet.dataGrid(path);
jet.dataGrid(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETDiagram by its recorded ID and path.
Format
The jet.diagram method has the following command format(s):
jet.diagram(path);
jet.diagram(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETDialGauge by its recorded ID and path.
Format
The jet.dialGauge method has the following command format(s):
jet.dialGauge(path);
jet.dialGauge(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETDialog by its recorded ID and path.
Format
The jet.dialog method has the following command format(s):
jet.dialog(path);
jet.dialog(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETFilmStrip by its recorded ID and path.
Format
The jet.filmStrip method has the following command format(s):
jet.filmStrip(path);
jet.filmStrip(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Find a component in a specified location by CSS selector.
Format
The jet.findComponent method has the following command format(s):
jet.findComponent(selector);
jet.findComponent(selector, windowIndex);
jet.findComponent(selector, windowIndex, documentIndex);
Command Parameters
a String targeting the element.
a 0 based index for each window.
a 0 based index for each document.
Find a list of components in a specified location by CSS selector.
Format
The jet.findComponents method has the following command format(s):
jet.findComponents(selector);
jet.findComponents(selector, windowIndex);
jet.findComponents(selector, windowIndex, documentIndex);
Command Parameters
a String targeting the elements.
a 0 based index for each window.
a 0 based index for each document.
Identifies a JETGantt by its recorded ID and path. This component is supported in Jet version 4.0.0 and above.
Format
The jet.gantt method has the following command format(s):
jet.gantt(path);
jet.gantt(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETIndexer by its recorded ID and path.
Format
The jet.indexer method has the following command format(s):
jet.indexer(path);
jet.indexer(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETInputDate by its recorded ID and path.
Format
The jet.inputDate method has the following command format(s):
jet.inputDate(path);
jet.inputDate(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Throws
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
Performs an action on an JETInputDate object specified by its recorded ID and path.
String value = jet.inputDate(11,
"/web:window[@index='0' or @title='InputDate - InputDate']" +
"/web:document[@index='0']" +
"/web:JETInputDate[@id='inputDate']")
.getDisplayValue();
info("value = " + value);
Identifies a JETInputDateTime by its recorded ID and path.
Format
The jet.inputDateTime method has the following command format(s):
jet.inputDateTime(path);
jet.inputDateTime(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Throws
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
Performs an action on an JETInputDateTime object specified by its recorded ID and path.
String value = jet.inputDateTime(11,
"/web:window[@index='0' or @title='InputDateTime - InputDateTime']" +
"/web:document[@index='0']" +
"/web:JETInputDateTime[@id='inputDateTime']")
.getDisplayValue();
info("value = " + value);
Identifies a JETInputNumber by its recorded ID and path.
Format
The jet.inputNumber method has the following command format(s):
jet.inputNumber(path);
jet.inputNumber(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETInputPassword by its recorded ID and path.
Format
The jet.inputPassword method has the following command format(s):
jet.inputPassword(path);
jet.inputPassword(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Throws
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
Performs an action on an JETInputPassword object specified by its recorded ID and path.
jet.inputPassword(11,
"/web:window[@index='0' or @title='InputPassword - InputPassword']" +
"/web:document[@index='0']" +
"/web:JETInputPassword[@id='inputPassword']")
.setPassword(deobfuscate("5blNah5kX/XuZnepYwInFw=="));
Identifies a JETInputSearch by its recorded ID and path.
Format
The jet.inputSearch method has the following command format(s):
jet.inputSearch(path);
jet.inputSearch(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETInputText by its recorded ID and path.
Format
The jet.inputText method has the following command format(s):
jet.inputText(path);
jet.inputText(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETInputTime by its recorded ID and path.
Format
The jet.inputTime method has the following command format(s):
jet.inputTime(path);
jet.inputTime(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Throws
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
Performs an action on an JETInputTime object specified by its recorded ID and path.
String value = jet.inputTime(11,
"/web:window[@index='0' or @title='InputTime - InputTime']" +
"/web:document[@index='0']" +
"/web:JETInputTime[@id='inputTime']")
.getDisplayValue();
info("value = " + value);
Check if busyContext is enabled. busyContext is a mechanism provided by JET to manage the busy context.
BusyContext was supported since JET V2.3, but by default it is disabled. To enable busyContext, set the "oj_whenReady" global variable to "true". More detail can be found at JET documentation.
The JET official cookbook enables busyContext by default since V3.1. If this function returns "true", the jet.waitForPageLoaded method waits until the page is loaded, otherwise jet.waitForPageLoaded method does nothing.
Identifies a JETLedGauge by its recorded ID and path.
Format
The jet.ledGauge method has the following command format(s):
jet.ledGauge(path);
jet.ledGauge(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Throws
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
Performs an action on an JETLedGauge object specified by its recorded ID and path.
String label = jet.ledGauge(11,
"/web:window[@index='0' or @title='LED Gauge - LED Gauge']" +
"/web:document[@index='0']" +
"/web:JETLedGauge[@id='' or @componentIndex='6']")
.getMetricLabel();
info("Label = " + label);
Identifies a JETLegend by its recorded ID and path.
Format
The jet.legend method has the following command format(s):
jet.legend(path);
jet.legend(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETListView by its recorded ID and path.
Format
The jet.listView method has the following command format(s):
jet.listView(path);
jet.listView(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETMenu by its recorded ID and path.
Format
The jet.menu method has the following command format(s):
jet.menu(path);
jet.menu(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETNavigationList by its recorded ID and path.
Format
The jet.navigationList method has the following command format(s):
jet.navigationList(path);
jet.navigationList(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETNBox by its recorded ID and path. This component is supported in jet version 4.0.0 and above.
Format
The jet.nbox method has the following command format(s):
jet.nbox(path);
jet.nbox(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETPagingControl by its recorded ID and path.
Format
The jet.pagingControl method has the following command format(s):
jet.pagingControl(path);
jet.pagingControl(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETPopup by its recorded ID and path.
Format
The jet.popup method has the following command format(s):
jet.popup(path);
jet.popup(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETProgressbar by its recorded ID and path.
Format
The jet.progressbar method has the following command format(s):
jet.progressbar(path);
jet.progressbar(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETRadioset by its recorded ID and path.
Format
The jet.radioset method has the following command format(s):
jet.radioset(path);
jet.radioset(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETRatingGauge by its recorded ID and path.
Format
The jet.ratingGauge method has the following command format(s):
jet.ratingGauge(path);
jet.ratingGauge(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETSelect by its recorded ID and path.
Format
The jet.select method has the following command format(s):
jet.select(path);
jet.select(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETSlider by its recorded ID and path.
Format
The jet.slider method has the following command format(s):
jet.slider(path);
jet.slider(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETStatusMeterGauge by its recorded ID and path.
Format
The jet.statusMeterGauge method has the following command format(s):
jet.statusMeterGauge(path);
jet.statusMeterGauge(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Throws
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
Performs an action on an JETStatusMeterGauge object specified by its recorded ID and path.
Double max = jet.statusMeterGauge(11,
"/web:window[@index='0' or @title='Status Meter Gauge - Center Content']" +
"/web:document[@index='0']" +
"/web:JETStatusMeterGauge[@id='gauge']")
.setValue(1000);
Identifies a JETSunburst by its recorded ID and path. This component is supported in jet version 4.0.0 and above.
Format
The jet.sunburst method has the following command format(s):
jet.sunburst(path);
jet.sunburst(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETSwitch by its recorded ID and path.
Format
The jet.Switch method has the following command format(s):
jet.Switch(path);
jet.Switch(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETTable by its recorded ID and path.
Format
The jet.table method has the following command format(s):
jet.table(path);
jet.table(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETTabs by its recorded ID and path.
Format
The jet.tabs method has the following command format(s):
jet.tabs(path);
jet.tabs(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETTagCloud by its recorded ID and path. This component is supported in jet version 4.0.0 and above.
Format
The jet.tagCloud method has the following command format(s):
jet.tagCloud(path);
jet.tagCloud(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Throws
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
Performs an action on an JETTagCloud object specified by its recorded ID and path.
int count = jet.tagCloud(11,
"/web:window[@index='0' or @title='TagCloud - Default']" +
"/web:document[@index='0']" +
"/web:JETTagCloud[@id='tag']")
.getItemCount();
info("Item count: " + Integer.toString(count));
Identifies a JETTextArea by its recorded ID and path.
Format
The jet.textArea method has the following command format(s):
jet.textArea(path);
jet.textArea(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETThematicMap by its recorded ID and path. This component is supported in jet version 4.0.0 and above.
Format
The jet.thematicMap method has the following command format(s):
jet.thematicMap(path);
jet.thematicMap(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Throws
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
Performs an action on an JETThematicMap object specified by its recorded ID and path.
int count = jet.thematicMap(11,
"/web:window[@index='0' or @title='ThematicMap - Default']" +
"/web:document[@index='0']" +
"/web:JETThematicMap[@id='map']")
..getAreaCount();
info("Area count: " + Integer.toString(count));
Identifies a JETTrain by its recorded ID and path.
Format
The jet.train method has the following command format(s):
jet.train(path);
jet.train(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETTree by its recorded ID and path.
Format
The jet.tree method has the following command format(s):
jet.tree(path);
jet.tree(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Identifies a JETTreemap by its recorded ID and path.
Format
The jet.treemap method has the following command format(s):
jet.treemap(path);
jet.treemap(recId, path);
Command Parameters
a String specifying the object path.
the ID of a previously recorded navigation, used for comparison purposes.
Throws
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
Performs an action on an JETTreemap object specified by its recorded ID and path.
int[] paths = jet.treemap(11,
"/web:window[@index='0' or @title='Treemap - Default']" +
"/web:document[@index='0']" +
"/web:JETTreemap[@id='map']")
.getNodeIndexPath("Test");
if(paths.length > 0)
info("path 0: " + Integer.toString(paths[0]));
Wait for JET page to be loaded. It uses the object time out value as the default time out value. If JET version is lower than V2.3 and the strategy that the busy context whenRead is not enabled, i.e. the "oj_whenReady" global variable is false
or undefined, this function does nothing. You can use jet.isBusyContextEnabled
to check if this function will be used based upon the busy context as shown in the example below.
Format
The jet.waitForPageLoaded method has the following command format(s):
jet.waitForPageLoaded(documentPath);
jet.waitForPageLoaded(documentPath, timeout);