FirefoxProfile firefoxProfile = new FirefoxProfile(path, false);
MessageBox.Show(firefoxProfile.ProfileDirectory); //Its showing blank
driver = new FirefoxDriver(firefoxProfile);
MessageBox.Show(firefoxProfile.ProfileDirectory); //Its showing the temp dir
//not my custom dir
如何使它接受我的目录并将所有的cookie和文件存储在那里?
谢谢。
编辑:
我需要让selenium配置文件夹固定(因为它一直在变化)。这样我就可以使用以前的cookies和缓存文件。你可以给我任何想法或任何其他方法来完成它吗?