2012-09-13 66 views

回答

2

您可以使用类似与自定义配置文件启动它:

profile = FirefoxProfile("path.to.profile") 
driver = webdriver.Firefox(profile) 
0

没有必要设置配置文件,它可以自动创建,你只需要路径插件,例如:

 string firebugPath = "C:\\Users\\Administrator\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\x7nutq33.default\\extensions\\[email protected]"; 
     FirefoxProfile profile = new FirefoxProfile();  
     profile.AddExtension(firebugPath); 
     Driver = new FirefoxDriver(profile); 
相关问题