0

Actually, I am trying to Built a GUI app in Tkinter using python where users can come and app links of their Zoom meetings so next time when they have that meeting they just click open in the app that will execute Selenium script that will open the browser and go that meeting link then open the zoom meeting but there comes a js pop asking the user to 'open zoom meeting' I want to accept this alert using selenium I tried using driver.switch_to.alert.accept() but it is not working for my case

Here is the image of pop : enter image description here

Here is my code :

from selenium import webdriver
import time
from selenium.webdriver.support.ui import Select
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--incognito')
chrome_driver_path = r"D:\chromedriver\chromedriver.exe"
driver = webdriver.Chrome(executable_path=chrome_driver_path, chrome_options=chrome_options)
driver.maximize_window()
driver.get("https://zoom.us/w/91991973876?tk=zLXe-KANiKGkp50x9m4j8vgo09LNUmYhhVevTmS8_vY.DQMAAAAVayYf9BZuQWppVUdISlNtZTdKcm1fRDhNbUxRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&pwd=Qm5TRW1yVUM4T1dpSWxWcHZxZzdxdz09")

# For maximizing window
time.sleep(4)
driver.switch_to.alert.accept()
  • 1
    Does this answer your question? [How to click on open application alert using Selenium](https://stackoverflow.com/questions/62154160/how-to-click-on-open-application-alert-using-selenium) – Lorn Jan 29 '22 at 22:15

1 Answers1

0

This is considered a Chrome browser notification rather than an alert. You could disable browser notifications by setting notification preferences like this:

prefs = {"profile.default_content_setting_values.notifications" : 2}
chrome_options.add_experimental_option("prefs", prefs)
Lorn
  • 194
  • 1
  • 5
  • I don't want to disable them I want to click on open Zoom app button on it ?? – ashusharma Jan 29 '22 at 04:11
  • You can only interact with browser-level popups with Selenium. You have to work around it in some way since prompts from applications are considered OS-level. There are several workarounds suggested here that you could try: https://stackoverflow.com/questions/62154160/how-to-click-on-open-application-alert-using-selenium – Lorn Jan 29 '22 at 22:15