Alerts are popup boxes that appear on the browser screen to provide information. It notifies errors, warnings, or seeks permission to perform a specific task. Selenium provides some default methods to handle alerts, as mentioned below:
Additionally, sometimes there are alert windows seeking permissions like microphone/camera access. These alerts can be handled by using your browser preferences. A sample Code snippet to handle such alerts is:
options.add_argument("--use-fake-ui-for-media-stream")
options.add_argument("--use-fake-device-for-media-stream")