How can i ignore popup

I’m studying an auto-segmentation project on Jupyter.
Is there a way to prevent notification pop-ups or confirmation pop-ups from appearing?
For example, after segmentation, when trying to save a label, a completion and log pop-up appears. Also, when trying to view another file during work, an OK/Cancel confirmation pop-up appears. I want it to proceed as if it’s okay without any pop-ups

You can avoid these popups if you automate the workflow by using logic classes without using any GUI classes. For example, do not launch a Slicer function by simulating button clicks but call those logic methods that the button click triggers (and skip the display of the confirmation popup).

Are there any relevant documents or tutorials available?

The PerkLab Bootcamp Slicer programming tutorial is a good starting point.

You can find Python code snippets for all the commonly needed operations in Slicer in the script repository. If you cannot find something and Bing Chat / ChatGPT cannot provide useful hints either then you can ask here and we’ll help.