Bug 252111
| Summary: | WebDriver reads localstorage of web extension from the wrong browser instance | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Oskar <oskar.persson> |
| Component: | WebDriver | Assignee: | 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 | ||
Oskar
When using the WebDriver through Selenium to read from the local storage of a web extension, the data is read from the wrong instance of the browser. Instead of reading from the instance created by the WebDriver, it reads from the "real" instance, instead. I have created a project showcasing the problem here: https://github.com/oskarpersson/storagebug
To reproduce:
1. Open the project in xcode and set a signing team on the extension
2. Build and run the extension and go to example.com
3. 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
4. Install the Selenium Python library: pip install selenium
5. Run python test.py
As you can (hopefully) see the test will go to https://webkit.org and then communicate with the extension and print out the response. Instead of printing out a list of "https://webkit.org" it will instead print out a list of "https://example.com" or whatever website you went to in step 2.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Oskar
I noticed that I had missed to make the repository public. This is now fixed.
Radar WebKit Bug Importer
<rdar://problem/105632078>