Webdriver没有用于添加个人证书的内置机制。
如果您使用的是firefox,我发现这样做的唯一方法是创建一个firefox配置文件并将证书添加到其中。然后,您可以在运行测试时重用配置文件,或者这是我的首选选项,获取cert8.db和key3.db文件,并将它们添加到webdriver在运行时创建的配置文件中。
I am not sure how yo do this in java, but in ruby I override the
layout_on_disk method of FirefoxProfile to add the extra files I required.
Java has the same
class
so you should be able to do this same thing.



