You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a mechanism for test automation to interact directly with MGTK,
allowing queries like "how many windows are open?", "what is the name
of the top-most window?", and "where is the top-most window's title
bar?" Since the MGTK API is relatively stable this is a safe
integration point.
Several tests updated to take advantage of this, but more can be
done.
Copy file name to clipboardExpand all lines: src/mgtk/MGTK.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1349,3 +1349,26 @@ _DA specific:_
1349
1349
_DA specific:_
1350
1350
1351
1351
* Following a window move, resize or close, call `JUMP_TABLE_CLEAR_UPDATES` to allow DeskTop to handle update events. This will not redraw the DA window, however.
1352
+
1353
+
# Automation
1354
+
1355
+
MGTK exposes an automation interface, intended for use by automated tests. It works as follows:
1356
+
1357
+
* Wait for the keyboard strobe to be cleared. (`KBD` high bit off)
1358
+
* Depress both Open Apple (`BUTN0`) and Solid Apple (`BUTN1`)
1359
+
* Submit a keypress of ASCII `NUL` (Ctrl+Shift+2 on the Apple II keyboard)
1360
+
* Wait for the keyboard strobe to be cleared.
1361
+
* Release both Open Apple (`BUTN0`) and Solid Apple (`BUTN1`)
1362
+
* Save copies of any bytes that will be modified by the following.
1363
+
* Store any "in" call parameters into memory. (`$0003` is a good location)
1364
+
* Set memory address `$0000` to the MGTK call number, and `$0001`/`$0002` to the address of parameter data.
1365
+
* Submit any keypress.
1366
+
* Wait for the keyboard strobe to be cleared.
1367
+
* Read the call result from address `$00`.
1368
+
* Load any "out" call parameters from memory.
1369
+
* Submit any keypress.
1370
+
* Wait for the keyboard strobe to be cleared.
1371
+
1372
+
Note that addresses assume the banking that this MGTK instance is running with. DeskTop normally runs with the Aux ZP active and MGTK-visible resoures like window titles in Aux or Aux LC memory. The Selector module has an MGTK instance in main memory and runs with the Main ZP active except for the alert code which resizes in the Aux LC bank.
1373
+
1374
+
Automation can use this interface to query for open windows and inspect their properties.
0 commit comments