Unlock figure locked by app testing framework
Create a class-based unit test that derives from
matlab.uitest.TestCase and contains a
classdef SimpleUITest < matlab.uitest.TestCase methods (Test) function test1(testCase) fig = uifigure; testCase.addTeardown(@delete,fig); button = uibutton(fig); keyboard; end end end
Run the test. MATLAB® enters debug mode at the
keyboard command. The figure is locked and you cannot interactively press the button.
While in debug mode, unlock the figure. You can interact with the button.
Continue execution of the test. The test completes and closes the figure during tear down.
fig — Figure to unlock
figure handle | array of figure handles
Figure to unlock, specified as a figure handle or an array of figure handles. Each figure handle must correspond to a figure created with the
Introduced in R2018a