MATLAB App Testing - Confirmation dialog boxes
이전 댓글 표시
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'
Michaela Konstantinou
2021년 9월 10일
편집: Michaela Konstantinou
2021년 9월 10일
채택된 답변
추가 답변 (3개)
Sean de Wolski
2021년 9월 10일
1 개 추천
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
Michaela Konstantinou
2021년 9월 13일
Sean de Wolski
2021년 9월 13일
I don't know of any hacky way. I added your vote to the enhancement request for this.
Michaela Konstantinou
2021년 9월 15일
Houman Rastegarfar
2025년 7월 10일
1 개 추천
Starting in R2024b, you can use the chooseDialog and dismissDialog methods to programmatically interact with confirmation dialog boxes. For an example, see Select Option in Nonblocking Dialog Box.
Cris LaPierre
2021년 9월 10일
0 개 추천
It sounds like you want to programmatically close a confirmation diaglog box. If so, see this answer.
카테고리
도움말 센터 및 File Exchange에서 Test Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!