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:

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

Step 2 - Change the script code:

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

    snooze(1)

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?='GlassMouseGrabProvider$Proxy*' visible='true'}")
    o.setVisible(False)
test.py

Step 3 - Set a breakpoint on the snooze(1) command in the main() function.

Step 4 - Execute to to the breakpoint.

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