我無法找到Firefox的配置文件路徑的路徑,我使用如何使用webdriver的
static String HubHost;
static String HubPort;
HubHost=java.net.InetAddress.getLocalHost().getCanonicalHostName().toString().trim();
HubPort = "4444";
FirefoxProfile profile = new FirefoxProfile();
DesiredCapabilities dc = DesiredCapabilities.firefox();
profile.setAssumeUntrustedCertificateIssuer(false);
dc.setCapability(FirefoxDriver.PROFILE, profile);
System.out.println("Profile name:"+profile.layoutOnDisk().);
URL grid_url=new URL("http://"+HubHost+":"+HubPort+"/wd/hub");
webdriver = new CustomRemoteWebDriver(grid_url,dc);
String suggestedProfile = System.getProperty("webdriver.firefox.profile");
System.out.println("Profile name:"+ suggestedProfile);
一個新的配置文件在TEMP文件夾中生成以下代碼找到Firefox的配置文件路徑名稱如「anonymous651976431316177878webdriver-profile
」,但無法通過代碼獲取該名稱。
任何幫助將不勝感激。
你想知道新的配置文件的*臨時*路徑爲什麼,因爲它將在WebDriver會話完成後被刪除? – bbbco
我想更改CERT8.db文件中的數據,該文件將處理瀏覽器SSL證書和Cookie – user2477308
您打算如何處理SSL證書和Cookie?在初始化瀏覽器之前,WebDriver已經在瀏覽器的Profile配置中集成了很多這些類型的scenerios。我建議首先檢查:https://code.google.com/p/selenium/wiki/RubyBindings#SSL_Certificates – bbbco