It opens some tabs and uses the Fireshot API to take screenshots.
However, enable the Fireshot API requires granting the runtime permission `tabs` to the extension, and it can only be operated in a GUI environment. I hope to pre-authorize the runtime permissions required by the extension when running the script. All attempts below failed:
- Use `options.add_experimental_option('prefs', prefs)` to inject the `f"extensions.settings.{EXT_ID}.runtime_granted_permissions"` property into the `Preferences` file - Backup and restore the `userDataDir/Preferences` and/or `userDataDir/Secure Preferences` - Use `initial_preferences` to load extension - Use the Chrome group policy, Also, it is scoped to the entire system or current user, and I just want to load the policy using command line parameters so that it works for the current example - Generate new user data dir, authorized runtime permission, backup once and restore every time the script running
Is there any other method besides the above? I can even accept modifying the opaque sqlite files under the User Data folder or Profile folder
0 comments