2015-02-24 103 views
0

) 在我的工作中,我遇到了麻煩,如何測試在遠程瀏覽器上的擴展名?擴展程序從.exe文件安裝,關閉所有打開的瀏覽器。我需要在所有瀏覽器中測試擴展,所以如果我打開新的chromeDriver或甚至firefoxDriver會話,它開始匿名會話,所以我不能測試擴展是否安裝正確或不。我想上面使用遠程機器的遠程配置文件與java java

File fp = new File("C:\\Users\\Admin\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\ojt048j5.default"); 
    FirefoxProfile ffProfile = new FirefoxProfile(fp); 

    DesiredCapabilities capability = DesiredCapabilities.firefox(); 
    capability.setCapability(FirefoxDriver.PROFILE, ffProfile); 
    capability.setBrowserName("firefox"); 
    URL hostURL = new URL("http://" + machine.getIp() + ":4444/wd/hub"); 
    WebDriver driver = new RemoteWebDriver(hostURL, capability); 
    driver.get("http://www.google.com") 

代碼使用Firefox配置文件從我的主機而不是從遠程

有任何sugestion如何測試呢?

回答