[dotnet] support installing temporary addon in Firefox#10093
[dotnet] support installing temporary addon in Firefox#10093titusfortner wants to merge 1 commit intoSeleniumHQ:trunkfrom
Conversation
|
Kudos, SonarCloud Quality Gate passed! |
| byte[] addOnBytes = File.ReadAllBytes(addOnFileToInstall); | ||
| string base64AddOn = Convert.ToBase64String(addOnBytes); | ||
| this.InstallAddOn(base64AddOn); | ||
| this.InstallAddOn(base64AddOn, temporary); |
There was a problem hiding this comment.
In reading #8357 (comment) it sounds like geckodriver supports local "unpacked" extensions (if the temporary flag is set) and in that case we'd need to use the "path" parametered api in that case. Ideally we'd check to see if the path is a directory and if so, use that api, otherwise base64 up the file like we are doing now and use the AddOn api.
There was a problem hiding this comment.
The API will be a method that takes a path, and a method that takes a path and a temporary value. The implementation of it doesn't matter to the end user.
There was a problem hiding this comment.
I agree with you that it will all work fine so long as path is the path to a .xpi or .zip but not when it is the path to an unpacked extension directory, which it would also be nice to support.
There was a problem hiding this comment.
We'll do everything with addon keyword instead of path, so it will work the way you need. It should already work properly with .NET in 4.1, just without the temporary toggle.
|
merged this instead 1b20938 |








This fixes #10084
Jim, I think this is correct, but let me know if I missed something. Thanks