Le riproduzione di basso livello supporta anche lo scorrimento della rotella del mouse.
È possibile utilizzare la riproduzione di basso livello per sopperire a limitazioni di prodotto, ad un mouse oscuro o a un'azione di tastiera. Ad esempio, per disegnare un cerchio in un programma di disegno, Functional Tester non supporta il trascinamento circolare complesso, tuttavia è possibile utilizzare il metodo drag() per disegnare linee rette. Per sopperire ad un'azione di tastiera o di mouse oscura, è possibile utilizzare la riproduzione di basso livello per riprodurre le azioni del mouse per disegnare il cerchio.
La classe RootTestObject include due metodi:
I metodi del produttore in SubitemFactory per la creazione di LowLevelEvents includono:
Vi sono dei metodi paralleli per i pulsanti del mouse destro e centrale. L'evento delay fornisce un ritardo minimo uguale ai millesimi di secondo specificati, che considera il tempo impiegato dal sistema per gestire l'evento precedente.
Un esempio di Functional Tester, Java™ Scripting per disegnare la lettera V nella parte superiore sinistra dell'area di disegno.
// This routine will draw a "V" in the upper left portion
// of the drawing canvas.
// First a point in the upper left corner will be clicked, the left mouse
// button will be held down for the duration of the action, the mouse
// will be moved to the right and down, then to the right and back up,
// and finally the left mouse button will be released.
Rectangle screenRect =
(Rectangle) drawingWindow().getProperty(".screenRectangle");
Point origin = new Point(screenRect.x + 5, screenRect.y + 5);
LowLevelEvent llEvents[] = new LowLevelEvent[7];
llEvents[0] = mouseMove(atPoint(origin.x, origin.y));
llEvents[1] = leftMouseButtonDown();
// insert a delay to provide the SUT with time to respond
// to the events being delivered to it.
llEvents[2] = delay(250);
llEvents[3] = mouseMove(atPoint(origin.x + 25, origin.y + 50));
llEvents[4] = delay(250);
llEvents[5] = mouseMove(atPoint(origin.x + 50, origin.y));
llEvents[6] = leftMouseButtonUp();
getRootTestObject().emitLowLevelEvent(llEvents);
Un esempio di Functional Tester, VB.NET Scripting per testare il controllo TrackBar e confermare che il controllo risponda agli eventi della rotella del mouse:
' This will test a TrackBar control to make sure ' that it responds to mouse wheel events. TrackBar1Slider().Click(AtPoint(0, 0)) ' Create a Low Level Event representing scrolling ' the mouse wheel down 25 clicks. Dim ScrollDown As LowLevelEvent = MouseWheel(-25) GetRootTestObject().EmitLowLevelEvent(ScrollDown) ' Verify The Results.