matlab.uitest.unlock
Unlock figure locked by app testing framework
Description
Examples
Unlock Figure
Create a class-based unit test that derives from matlab.uitest.TestCase
and contains a keyboard
statement.
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.
runtests('SimpleUITest')
While in debug mode, unlock the figure. You can interact with the button.
K>> matlab.uitest.unlock(fig);
Continue execution of the test. The test completes and closes the figure during tear down.
K>> dbcont
Input Arguments
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 uifigure
function.
Example: fh
Example: [fh1 fh2]
Data Types: matlab.ui.Figure
Version History
Introduced in R2018a
See Also
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)