MATLAB App Testing - Confirmation dialog boxes

11视图(last 30 days)
How can I handle confirmation dialog boxes when testing an app with gestures?
Ideally, I would like to choose 'OK' or 'Cancel' based on some variables' values.
我知道没有一种直接的方法可以做到这一点,但是是否有任何选择,以便它们被禁用或其他?
2 Comments
Michaela Konstantinou
Michaela Konstantinou on 10 Sep 2021
but I dont have buttons and the confirmation boxes are not properties of the app. They are created with uiconfirm in a another component's callback function.

Sign in to comment.

Accepted Answer

安迪Campbell
安迪Campbell 2021年9月13日
Until this functionality is included in the App Testing Framework, if you can adjust the architecture of the source code you can leverage a similar strategy as that outlined 这里 and use a mock for the confirmation dialog.
这有助于您前进吗?
Thanks,
安迪
2 Comments
Michaela Konstantinou
Michaela Konstantinou on 15 Sep 2021
I would like to ask if it is possible to close manualy these dialog boxes during testing with matlab.uitest.unlock. Where in the source code or the testing code should I add this feature? could you please help?

Sign in to comment.

More Answers (2)

肖恩·德·沃尔斯基(Sean de Wolski)
You can dismiss and alert but not a confirmation dialog yet. Capability for alerts added in 21a.
//www.tianjin-qmedu.com/help/releases/r2021a/matlab/ref/ref/matlab.uitest.testcase.dismissalertdialog.html
3 Comments

Sign in to comment.


克里斯·拉皮埃尔
克里斯·拉皮埃尔 on 10 Sep 2021
听起来您想在编程上关闭一个确认戴戴戴戴盘盒。如果是这样,请参阅 这个答案 .

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

开始狩猎!