Addressing Objects in Oracle Forms/EBS Applications

Applies to TestComplete 15.62, last modified on March 19, 2024

In TestComplete tests, there are several ways to refer to objects in tested Oracle Forms/EBS applications.

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.

Viewing the object hierarchy in the Object Browser

You explore the object hierarchy of your Oracle Forms/EBS applications 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.

TestComplete recognizes Oracle Forms/EBS 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, 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 objects using name mapping and aliases

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.

Note: To make aliases for Oracle Forms objects shorter, TestComplete does not include intermediate objects (containers, comps, scroll boxes, draw panels) in the alias tree.

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.main.popList.ClickItem("Item1");

Python

Aliases.browser.pageOracleFusionMiddlewareFormsS.main.popList.ClickItem('Item1')

VBScript

Call Aliases.browser.pageOracleFusionMiddlewareFormsS.main.popList.ClickItem("Item1")

DelphiScript

Aliases.browser.pageOracleFusionMiddlewareFormsS.main.popList.ClickItem('Item1');

C++Script, C#Script

Aliases["browser"]["pageOracleFusionMiddlewareFormsS"]["main"]["drawnPanel"]["popList"]["ClickItem"]("Item1");

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

Addressing 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.AWTObject("VPopList0").ClickItem("Item1");

Python

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

VBScript

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

DelphiScript

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

C++Script, C#Script

Aliases["browser"]["pageOracleFusionMiddlewareFormsS"]["Main0"]["MDIContainer"]["FormDesktopContainer"]["ExtendedFrame"]["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 Applications
Accessing Native Methods of Oracle Forms/EBS
Name Mapping
Addressing Objects of Open Applications

Highlight search results