升级 firefox 19 后,我在 selenium web 驱动程序中遇到以下错误
WebDriverException: Message: "Can't load the profile. Profile Dir:
除了降级firefox还有什么办法可以解决这个问题
我怀疑硒丢失了配置文件配置。
尝试重新加载一个全新的配置文件,看看这是否能解决您的问题:
profile = Selenium::WebDriver::Firefox::Profile.new
driver = Selenium::WebDriver.for :firefox, :profile => profile
或者对于您已经在 Firefox 中创建的特定配置文件:
profile = Selenium::WebDriver::Firefox::Profile.from_name "Selenium"
driver = Selenium::WebDriver.for(:firefox, :profile => profile)