我找不到Firefox个人资料的路径,我正在使用以下代码:
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文件夹中生成了一个名为"anonymous651976431316177878webdriver-profile
"的新配置文件,但无法通过代码获取此名称。
任何帮助都将不胜感激。