Skip to content

Commit

Permalink
Allow temporary installation of FF extension (#1) (#5751)
Browse files Browse the repository at this point in the history
* Allow temporary installation of FF extension

Extremely handy for testing browser extensions without the need of signing them
  • Loading branch information
kvetko authored and jleyba committed Jun 28, 2018
1 parent c4acbe5 commit 3e99112
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions javascript/node/selenium-webdriver/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,15 +624,18 @@ class Driver extends webdriver.WebDriver {
*
* @param {string} path Path on the local filesystem to the web extension to
* install.
* @param {boolean} temporary Flag indicating whether the extension should be
* installed temporarily - gets removed on restart
* @return {!Promise<string>} A promise that will resolve to an ID for the
* newly installed addon.
* @see #uninstallAddon
*/
async installAddon(path) {
async installAddon(path, temporary=false) {
let buf = await io.read(path);
return this.execute(
new command.Command(ExtensionCommand.INSTALL_ADDON)
.setParameter('addon', buf.toString('base64')));
.setParameter('addon', buf.toString('base64'))
.setParameter('temporary', temporary));
}

/**
Expand Down

0 comments on commit 3e99112

Please sign in to comment.