我要安装的XPI路径是
#region VARS
const string adblock = @"C:\pm\Sources\Extension\adblock_plus-3.4.2-an+fx.xpi";
然后我执行以下操作,firefox中什么也没有发生,没有加载/安装扩展名。
const string adblock = @"C:\pm\Sources\Extension\adblock_plus-3.4.2-an+fx.xpi";
FirefoxProfile profile = new FirefoxProfile();
profile.AddExtension(adblock);
FirefoxOptions ffoptions = new FirefoxOptions();
IWebDriver driver = new FirefoxDriver(ffoptions);
不接受:无法从FirefoxProfile转换为FirefoxOptions:
const string adblock = @"C:\pm\Sources\Extension\adblock_plus-3.4.2-an+fx.xpi";
FirefoxProfile profile = new FirefoxProfile();
profile.AddExtension(adblock);
IWebDriver driver = new FirefoxDriver(profile);