我正在尝试使用我已经使用selenium 2为firefox设置的配置文件但是没有C#的文档.我试过的代码如下:
FirefoxProfileManager profileManager = new FirefoxProfileManager();
FirefoxProfile profile = profileManager.GetProfile(profileName);
driver = new FirefoxDriver(profile);
Run Code Online (Sandbox Code Playgroud)
我在Java中看到的代码使用的是使用ProfilesIni而不是FirefoxProfileManager的代码,但这在C#中不可用.以这种方式设置驱动程序时,使用的selenium配置文件具有所有默认设置,而不是我试图指向的配置文件中指定的设置.
我不确定我是否使用正确的方法来检索配置文件,但如果有人使用Selenium 2和C#,任何信息都会有所帮助.