Addressing Objects in Oracle Forms

Applies to TestComplete 14.71, last modified on April 22, 2021

There are several ways to refer to objects in Oracle Forms.

If you use Name Mapping in your test project, you can refer to objects using their mapped names. For non-mapped objects, you can use the naming syntax that identifies these objects in the object hierarchy directly.

This topic explains both approaches.

Viewing the Object Hierarchy in the Object Browser

You explore the object hierarchy of your Oracle Forms applet in the Object Browser. Below is a sample view of such a hierarchy:

A view of Oracle Forms in the object tree

Click the image to enlarge it.

.

The Object Hierarchy of an Oracle Forms Applet Running in a Web Browser

A view of Oracle Forms in the object tree

Click the image to enlarge it.

The Object Hierarchy of an Oracle Forms Applet Running Out-Of-Browser

TestComplete recognizes Oracle Forms as Java applets and Oracle Forms controls as AWTObjects. You address objects inside Oracle Forms in the same way you address objects in Java applications (see Addressing Objects in Java Applications).

Note:

Support for Java applet has been removed from Java version 11.

To refer to an individual object in your Forms applet, you can use the name that the Object Browser (or Object Spy) shows:

  1. Select the needed object in the object hierarchy.

  2. Select the name that the Object Browser shows and copy the name to the Clipboard.

  3. Insert the copied name to the needed place in your test.

The syntax of the name depends on whether the object is mapped. See more on this below.

To learn how an object name should be written by using certain syntax, take a look at the following properties in the Object Browser:

  • MappedName - The object’s fully-qualified alias (including the aliases of all parent objects). TestComplete uses that name in tests by default. If the object in not mapped, the property is empty.

  • Name - The object name that includes the object’s identification properties. This is the same name you see in the object hierarchy in the Object Browser.

  • FullName - The object’s fully-qualified name that includes the object’s identification properties and identification properties of its parents.

Addressing Oracle Forms Objects Using Name Mapping and Aliases

By default, TestComplete uses the Name Mapping repository to store identification information on the objects with which you interact during the tests. For objects added to the Name Mapping repository, TestComplete generates aliases - the names it uses to refer to objects from tests.

When you record tests, TestComplete automatically adds the recorded objects to the Name Mapping repository and generates aliases for them. You can view them in the Name Mapping editor:

Sample Name Mapping for Oracle Forms

Click the image to enlarge it.

Here, Mapped Objects and Aliases display the hierarchy of mapped objects and their aliases, respectively.

To refer to an object from a test, use the object’s alias:

A keyword test operation over an Oracle Forms object addressed using its alias
Note: For simplicity, keyword tests do not display the Aliases identifier at the beginning of object aliases.

Also, keyword tests may not display intermediate objects in the application’s object hierarchy. To view the full name of an operation’s target object, double-click the operation or increase the Maximum depth option in Keyword Test Editor - Groups options.

JavaScript, JScript

Aliases.browser.pageOracleFusionMiddlewareFormsS.Main0.MDIContainer.FormDesktopContainer.ExtendedFrame.DrawnPanel.VPopList0.ClickItem("Item1");

Python

Aliases.browser.pageOracleFusionMiddlewareFormsS.Main0.MDIContainer.FormDesktopContainer.ExtendedFrame.DrawnPanel.VPopList0.ClickItem('Item1')

VBScript

Call Aliases.browser.pageOracleFusionMiddlewareFormsS.Main0.MDIContainer.FormDesktopContainer.ExtendedFrame.DrawnPanel.VPopList0.ClickItem("Item1")

DelphiScript

Aliases.browser.pageOracleFusionMiddlewareFormsS.Main0.MDIContainer.FormDesktopContainer.ExtendedFrame.DrawnPanel.VPopList0.ClickItem('Item1');

C++Script, C#Script

Aliases["browser"]["pageOracleFusionMiddlewareFormsS"]["Main0"]["MDIContainer"]["FormDesktopContainer"]["ExtendedFrame"]["DrawnPanel"]["VPopList0"]["ClickItem"]("Item1");

For more information on using Name Mapping and aliases, see Name Mapping and Access Objects by Aliases.

Addressing Oracle Forms Objects Without Name Mapping

In your tests, you can work not only with mapped objects, but also with any other object in any running application. You can address these objects by using their identification properties:

A keyword test operation over a non-mapped Oracle Forms object

JavaScript, JScript

Sys.Browser("*").Page("*").Object(0).AWTObject("PluginEmbeddedFrame", "", -1).SwingObject("Main0").AWTObject("MDIContainer1").AWTObject("EwtComponent2").AWTObject("ScrollBox6").AWTObject("ScrollBox$17").AWTObject("FormDesktopContainer12").AWTObject("ExtendedFrame13").AWTObject("LWComponent17").AWTObject("EwtComponent19").AWTObject("FScrollBox22").AWTObject("ScrollBox$123").AWTObject("DrawnPanel24").AWTObject("FScrollBox26").AWTObject("ScrollBox$127").AWTObject("DrawnPanel28").AWTObject("VPopList0").ClickItem("Item1");

Python

Sys.Browser('*').Page('*').Object(0).AWTObject('PluginEmbeddedFrame', '', -1).SwingObject('Main0').AWTObject('MDIContainer1').AWTObject('EwtComponent2').AWTObject('ScrollBox6').AWTObject('ScrollBox$17').AWTObject('FormDesktopContainer12').AWTObject('ExtendedFrame13').AWTObject('LWComponent17').AWTObject('EwtComponent19').AWTObject('FScrollBox22').AWTObject('ScrollBox$123').AWTObject('DrawnPanel24').AWTObject('FScrollBox26').AWTObject('ScrollBox$127').AWTObject('DrawnPanel28').AWTObject('VPopList0').ClickItem('Item1')

VBScript

Call Sys.Browser("*").Page("*").Object(0).AWTObject("PluginEmbeddedFrame", "", -1).SwingObject("Main0").AWTObject("MDIContainer1").AWTObject("EwtComponent2").AWTObject("ScrollBox6").AWTObject("ScrollBox$17").AWTObject("FormDesktopContainer12").AWTObject("ExtendedFrame13").AWTObject("LWComponent17").AWTObject("EwtComponent19").AWTObject("FScrollBox22").AWTObject("ScrollBox$123").AWTObject("DrawnPanel24").AWTObject("FScrollBox26").AWTObject("ScrollBox$127").AWTObject("DrawnPanel28").AWTObject("VPopList0").ClickItem("Item1")

DelphiScript

Sys.Browser('*').Page('*').Object(0).AWTObject('PluginEmbeddedFrame', '', -1).SwingObject('Main0').AWTObject('MDIContainer1').AWTObject('EwtComponent2').AWTObject('ScrollBox6').AWTObject('ScrollBox$17').AWTObject('FormDesktopContainer12').AWTObject('ExtendedFrame13').AWTObject('LWComponent17').AWTObject('EwtComponent19').AWTObject('FScrollBox22').AWTObject('ScrollBox$123').AWTObject('DrawnPanel24').AWTObject('FScrollBox26').AWTObject('ScrollBox$127').AWTObject('DrawnPanel28').AWTObject('VPopList0').ClickItem('Item1');

C++Script, C#Script

Sys["Browser"]("*")["Page"]("*")["Object"](0)["AWTObject"]("PluginEmbeddedFrame", "", -1)["SwingObject"]("Main0")["AWTObject"]("MDIContainer1")["AWTObject"]("EwtComponent2")["AWTObject"]("ScrollBox6")["AWTObject"]("ScrollBox$17")["AWTObject"]("FormDesktopContainer12")["AWTObject"]("ExtendedFrame13")["AWTObject"]("LWComponent17")["AWTObject"]("EwtComponent19")["AWTObject"]("FScrollBox22")["AWTObject"]("ScrollBox$123")["AWTObject"]("DrawnPanel24")["AWTObject"]("FScrollBox26")["AWTObject"]("ScrollBox$127")["AWTObject"]("DrawnPanel28")["AWTObject"]("VPopList0")["ClickItem"]("Item1");

To learn which syntax is used to refer to a particular object, use the Object Browser. The object tree and the FullName property of objects always use the needed naming syntax.

TestComplete recognizes objects in Oracle Forms as AWTObjects. To identify an object, it uses the object’s native name that the application developers set for the object in the applet’s source code.

Combining Mapped and Unmapped Object Names

You can combine aliases specified in the Name Mapping repository and AWTObjects when referring to the object hierarchy in tests:

JavaScript, JScript

Aliases.browser.pageOracleFusionMiddlewareFormsS.Main0.MDIContainer.FormDesktopContainer.ExtendedFrame.DrawnPanel.AWTObject("VPopList0").ClickItem("Item1");

Python

Aliases.browser.pageOracleFusionMiddlewareFormsS.Main0.MDIContainer.FormDesktopContainer.ExtendedFrame.DrawnPanel.AWTObject('VPopList0').ClickItem('Item1')

VBScript

Call Aliases.browser.pageOracleFusionMiddlewareFormsS.Main0.MDIContainer.FormDesktopContainer.ExtendedFrame.DrawnPanel.AWTObject("VPopList0").ClickItem("Item1")

DelphiScript

Aliases.browser.pageOracleFusionMiddlewareFormsS.Main0.MDIContainer.FormDesktopContainer.ExtendedFrame.DrawnPanel.AWTObject('VPopList0').ClickItem('Item1')

C++Script, C#Script

Aliases["browser"]["pageOracleFusionMiddlewareFormsS"]["Main0"]["MDIContainer"]["FormDesktopContainer"]["ExtendedFrame"]["DrawnPanel"]["AWTObject"]("VPopList0")["ClickItem"]("Item1")

Aliases must always precede the AWTObject notation in the object hierarchy. Do not use aliases after the AWTObject notation within the same statement.

See Also

Testing Oracle Forms
Testing Oracle Forms - Overview
Accessing Native Methods of Oracle Forms
Name Mapping
Addressing Objects of Open Applications

Highlight search results