How can I include the "blue dot" when taking pictures of an app for a test report.
1 view (last 30 days)
The App Testing Framework allows Matlab to "press" GUI buttons to test that they have the right effect, and it provides a helpful blue dot so that you can see where the virtual mouse clicks occur, while it happens. It would be handy if I could take pictures of this behaviour and log them in the error report, as an additional check that pressing the "Plot" button causes a graph to appear. Unfortunately, I know two methods that almost do this, but not quite. Both these are used with testCase.log() or similar constructions.
- Using the FigureDiagnostic class (e.g. FigureDiagnostic(app.UIFigure, Formats = "png") ) correctly takes a picture of the app, but it does not include the blue dot. This makes it a bit harder to see at a glance what the test was attempting to do.
- Using the ScreenshotDiagnostic class does include the blue dot in its image (see clipping above), but the screenshot includes the entire screen (including all monitors), not just the app. It would be inconvenient to turn off my extra monitors every time I run tests.
Is there a way to combine the advantage of both these methods, please?
I have thought of expanding the gesture functions ( testCase.press(app.Switch_1) etc.) to also change the colour of the control (although switches don't have a changeable colour); or to superimpose a label object with a symbol indicating the interaction. But they may come with all sorts of problems of their own, and I hope there is an easier way.