MATLAB App Testing - Confirmation dialog boxes
10 ビュー (過去 30 日間)
古いコメントを表示
Michaela Konstantinou
2021 年 9 月 9 日
コメント済み: Michaela Konstantinou
2021 年 9 月 15 日
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.
I know there is not a straight-forward way to do it but is there any option so that they get disabled or something??
2 件のコメント
Thomas Fournier
2021 年 9 月 10 日
you can create them, and chosse if they are visible or not, editable or note.
app.Button1.Visible='off'
app.Button2.Editable='off'
採用された回答
Andy 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 here and use a mock for the confirmation dialog.
Does that help you get going?
Thanks,
Andy
その他の回答 (2 件)
Sean de Wolski
2021 年 9 月 10 日
You can dismiss and alert but not a confirmation dialog yet. Capability for alerts added in 21a.
https://www.mathworks.com/help/releases/R2021a/matlab/ref/matlab.uitest.testcase.dismissalertdialog.html
3 件のコメント
Sean de Wolski
2021 年 9 月 13 日
I don't know of any hacky way. I added your vote to the enhancement request for this.
Cris LaPierre
2021 年 9 月 10 日
It sounds like you want to programmatically close a confirmation diaglog box. If so, see this answer.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Testing Frameworks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!