2016-01-26 20 views
0

我需要爲我使用的Firefox個人檔案放置Firefox插件路徑。如何在Linux中找到Firefox插件路徑

profile = webdriver.FirefoxProfile(plugin_path) 
profile.set_preference("webdriver.load.strategy", "fast") 

如何找到在Linux下Firefox的插件路徑,這樣我可以通過plugin_path我的Python腳本

回答

0

我不知道你爲什麼要加載插件這種方式來FirefoxProfile?文檔有一個不同的例子:

File file = new File("firebug-1.8.1.xpi"); 
FirefoxProfile firefoxProfile = new FirefoxProfile(); 
firefoxProfile.addExtension(file); 
firefoxProfile.setPreference("extensions.firebug.currentVersion", "1.8.1"); // Avoid startup screen 

WebDriver driver = new FirefoxDriver(firefoxProfile); 

總之,Firefox的插件都位於~/.mozilla/firefox/MY_PROFILE/extensions

相關問題