我想測試我的Firefox的webextension但firefox拒絕安裝它,因爲它沒有install.rdf
文件。但該文件不再由webextensions使用。無法安裝WebExtension與硒
const firefox = require('selenium-webdriver/firefox');
const webdriver = require('selenium-webdriver');
require('geckodriver');
let profile = new firefox.Profile();
profile.addExtension(process.cwd() + '/build/firefox/');
profile.setPreference('extensions.firebug.showChromeErrors', true);
let options = new firefox.Options().setProfile(profile);
let _driver = new webdriver.Builder()
.forBrowser('firefox')
.setFirefoxOptions(options)
.build();
Error: ENOENT: no such file or directory, open '/dev/webext/build/firefox/install.rdf'
是否有我需要啓用告訴它這是一個webextension設置?
謝謝!這樣可行!。有一個問題,是否有可能檢索擴展內部UUID?因此,我可以訪問擴展的彈出框 – Cornwell
檢查'installWebExt'返回的值,它可能是UUID:'installWebExt(...)。then(id => ...)' –
不幸的是它是擴展的ID在清單中,所以它不能用於此。但是我想我可以通過'about:debugging#addons'頁面進行一些醜陋的修改。 再次感謝! – Cornwell