NEW 225050
Safari preferences for setting Pop-up Windows not working in Selenium tests with Webdriver
https://bugs.webkit.org/show_bug.cgi?id=225050
Summary Safari preferences for setting Pop-up Windows not working in Selenium tests w...
harshit
Reported 2021-04-26 06:47:18 PDT
Created attachment 427039 [details] GIF showing the bug inside locally executed selenium through webdriver in which pop-up functionality is tested. Browsers: Safari 12.1, 13.1 and 14 Safari provides pop-up windows preferences to be set to three modes. "Block", "Block and Notify" and "Allow". These preferences work when running in a normal Safari session. However, on running selenium tests with webdriver the settings are not honoured and the default behavior is set to always allow popups even when set to "Block" or "Block and Notify". Note: when the running selenium session is stopped manually by interfering through mouse click, even after stopped session the same behavior is observed wherein pop-up preference is not being honored even on manually testing popup feature.
Attachments
GIF showing the bug inside locally executed selenium through webdriver in which pop-up functionality is tested. (750.07 KB, image/gif)
2021-04-26 06:47 PDT, harshit
no flags
harshit
Comment 1 2021-04-28 04:20:40 PDT
Attaching sample script to reproduce the issue herein. To change safari preferences 1. Open safari Browser 2. Go to preferences 3. Go to Pop-up Windows 4. Select one of the three modes given next to "When visiting other websites" import time from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver import ActionChains driver = webdriver.Safari() driver.get("https://deliver.courseavenue.com/PopupTest.aspx") element = driver.find_element_by_css_selector('#ctl00_ContentMain_popupTest') action = ActionChains(driver) action.click(element).perform() time.sleep(10) driver.quit()
Radar WebKit Bug Importer
Comment 2 2021-05-03 06:48:14 PDT
Note You need to log in before you can comment on or make changes to this bug.