MATLAB Answers

MATLAB App Testing - Confirmation dialog boxes

조회 수: 8(최근 30일)
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
Michaela Konstantinou
Michaela Konstantinou 2021년 9월 10일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Andy Campbell
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?
  댓글 수: 2
Michaela Konstantinou
Michaela Konstantinou 2021년 9월 15일
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?

댓글을 달려면 로그인하십시오.

추가 답변(2개)

Sean de Wolski
Sean de Wolski 2021년 9월 10일
You can dismiss and alert but not a confirmation dialog yet. Capability for alerts added in 21a.
  댓글 수: 3
Michaela Konstantinou
Michaela Konstantinou 2021년 9월 15일
Thank you

댓글을 달려면 로그인하십시오.

Cris LaPierre
Cris LaPierre 2021년 9월 10일
It sounds like you want to programmatically close a confirmation diaglog box. If so, see this answer.

Community Treasure Hunt

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

Start Hunting!

Translated by