Hi Dong,
Could you try performing check on the label(text) which is present in cancel popup.
Ideally what you are doing should work as far as I know, I had done a similar check and I had used label so just want you to check that option.
Regards,
Karthikeya