MATLAB App Testing - Confirmation dialog boxes
Afficher commentaires plus anciens
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 commentaires
Thomas Fournier
le 10 Sep 2021
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
le 10 Sep 2021
Modifié(e) : Michaela Konstantinou
le 10 Sep 2021
Réponse acceptée
Plus de réponses (3)
Sean de Wolski
le 10 Sep 2021
1 vote
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 commentaires
Michaela Konstantinou
le 13 Sep 2021
Sean de Wolski
le 13 Sep 2021
I don't know of any hacky way. I added your vote to the enhancement request for this.
Michaela Konstantinou
le 15 Sep 2021
Houman Rastegarfar
le 10 Juil 2025
1 vote
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
le 10 Sep 2021
0 votes
It sounds like you want to programmatically close a confirmation diaglog box. If so, see this answer.
Catégories
En savoir plus sur Test Apps dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!