Bug 252112

Summary: WebDriver gets stuck when visiting safari-web-extension:// URLs
Product: WebKit Reporter: Oskar <oskar.persson>
Component: WebDriverAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bburg, jberlin, pangle, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: All   
OS: All   

Description Oskar 2023-02-11 08:34:30 PST
When using the WebDriver through Selenium to go to a page of a web extension, it gets stuck. It seems like the driver doesn't know that the page has finished loading and can't proceed to the next step. I have created a project showcasing the problem here: https://github.com/OskarPersson/driverextpage

To reproduce:

1. Open the project in xcode and set a signing team on the extension
2. Edit test.py and change the team id of "com.oskarpersson.storagebug.Extension (H528K2VA5W)" to the id of the team you set in step 1. The id can for example be found at https://developer.apple.com/account#MembershipDetailsCard
3. Install the Selenium Python library: pip install selenium
4. Run python test.py

The test goes to https://webkit.org and then communicates with the extension to get the URL of the popup.html which will look like this: safari-web-extension://<id>/popup.html. It then tries to visit this page and, as seen in Safari, the page is loaded. But then the driver never proceeds to the next step.
Comment 1 Radar WebKit Bug Importer 2023-02-18 08:35:17 PST
<rdar://problem/105632222>