Current level of proxy support that HCL OneTest™ UI provides
To develop proxies for a control, you must understand the current level of support that HCL OneTest™ UI provides for that control. Consider that you want to add testing support for the Java™ swing UI control, javax.swing.JFormattedTextField.
Verifying that a control already has a specified ProxyObject
You can identify this by looking at the customization files. All proxy and control mapping
information is in the customization files, which have the extension .rftcust. Customization
files are either located at the HCL OneTest™
UI
installation directory (C:\Program
Files\HCL\HCLOneTest\FunctionalTester\bin
) or the customization directory
(C:\ProgramData\HCL\HOTUI\customization
).
For example, if you want to verify whether the control
javax.swing.JFormattedTextField
already has a ProxyObject created for it,
search for javax.swing.JFormattedTextField
in the customization files. If
you find a map entry, it means that there is a ProxyObject specifically written for this
control.
Verifying the ProxyObject that is currently being used for testing a control
You can verify the ProxyObject by recording a control using HCL OneTest™ UI. See the Administrative properties of the TestObject in the ObjectMap editor.
JFormattedTextField
control
and start recording. Open the ObjectMap editor to view the Administrative properties of the
TestObject representing JFormattedTextField
to find the proxy that HCL OneTest™
UI is currently using to test this
control. Additional information
To understand the current level of support better, you need some additional information on control hierarchy and customization mapping.
The inheritance hierarchy of an AUT control
The inheritance hierarchy of an application under test (AUT) control is usually found in
the UI framework documentation. For example, the inheritance hierarchy of
javax.swing.JFormattedTextField
is available in the Java
documentation.
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextField
javax.swing.JFormattedTextField
HCL OneTest™ UI customization mapping entry for a proxy
java.jfc.JTextProxy
is the currently used
ProxyObject for javax.swing.JFormattedTextField
, the corresponding mapping
entry is available at the rational_ft.rftcust
file as follows:
<Obj L=".Proxy">
<ClassName>com.rational.test.ft.domain.java.jfc.JTextProxy</ClassName>
<Replaces/>
<UsedBy>javax.swing.JEditorPane</UsedBy>
<UsedBy>javax.swing.JTextArea</UsedBy>
<UsedBy>javax.swing.JTextField</UsedBy>
<UsedBy>javax.swing.JPasswordField</UsedBy>
<UsedBy>javax.swing.JTextPane</UsedBy>
</Obj>
- The
java.jfc.JTextProxy
is written exclusively to handle Java swing controls likeJEditorPane
,JTextArea
,JTextField
,JPasswordField
, andJTextPane
, but not for thejavax.swing.JFormattedTextField
control. - HCL OneTest™
UI picked up
java.jfc.JTextProxy
as the ProxyObject for testingJFormattedTextField
control becauseJTextField
is the super class forJFormattedTextField
and it hasjava.jfc.JTextProxy
as the ProxyObject.Important: HCL OneTest™ UI first looks for an explicit ProxyObject and control mapping entry for the control under test. If it fails to find one, it looks for mapping entries for any of the super classes for the control in the inheritance hierarchy. - Because there is no ProxyObject that is written exclusively for the control
javax.swing.JFormattedTextField
, contol-specific properties such asformatString
andunformatedValue
cannot be exposed through thegetProperties()
method of HCL OneTest™ UI. - Here is an opportunity for proxy developers to write the
JFormattedTextFieldProxy
by extendingjava.jfc.JTextProxy
exclusively for thejavax.swing.JFormattedTextField
control. One of methods that can be extended isgetProperties()
for adding control specific properties likeformatString
andunformatedValue
.
ProxyObject inheritance hierarchy
You must also look at the proxy inheritance hierarchy as well. Proxy inheritance hierarchy information is available in HCL OneTest™ UI proxy API reference Guide.
ProxyTestObject
JavaProxy
JavaGuiProxy
awt.ComponentProxy
jfc.JComponentProxy
jfc.JfcGraphicalSubitemProxy
jfc.JScrollPaneProxy
jfc.JTextProxy