Automating Oracle Forms applications (Java)

Last edited on

Overview

Oracle Forms applications are actually Java applets plus some additional functionality from Oracle.

Unfortunately, Oracle Forms applications have an invisible object that overlays the complete UI and which Squish records all mouse clicks on.

To workaround this it should work to hide this invisible object in the test script - before starting to record. This means that one should use snippet recording at a breakpoint.

Getting Started with Recording and Picking

Step 1 - Record a test script that only performs one click in the Oracle Forms application. For example:

from objectmaphelper import Wildcard

def main():
    loadUrl("...")
    ...
    waitForApplicationLaunch()
    mouseClick(waitForObject("..."), ...)
test.py

Step 2 - Change the script code:

def main():
    loadUrl("...")
    ...
    waitForApplicationLaunch()
    init_oracle_forms_usage()

    test.breakpoint()

def init_oracle_forms_usage():
    # Hide the transparent pane that otherwise would
    # be getting all mouse clicks:
    o = waitForObject({"basetype": "oracle.ewt.lwAWT.LWComponent", "name": Wildcard("GlassMouseGrabProvider$Proxy*", "visible": "true"})
    o.setVisible(False)
test.py

Step 3 - Execute to to the breakpoint.

Step 4 - Start recording (Run > Record Snippet) or Picking and inspecting objects .