2013-10-29 75 views
0

如何處理跳轉到localhost:8080/manager for tomcat時彈出請求的詳細信息?selenium登錄到tomcat管理器

我看不到如何把女巫的窗口鍵入用戶通行證。

香港專業教育學院嘗試使用autoauth插件,絲毫沒有運氣

我已經試過

"driver.get("http://user:[email protected]:8080/manager)" 

我完全卡住了!

@Before 
public void setUp() throws Exception { 
    FirefoxProfile ffProfile = new FirefoxProfile(); 
    ffProfile.setPreference("network.http.phishy-userpass-length", 255); 
    driver = new FirefoxDriver(ffProfile); 
    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); 
} 

這就是我目前如何設置我的webdriver。

回答

0

我不認爲webdriver支持這個開箱即用的對話框。總之,讓你的用戶:通@網站架構工作,在Firefox必須

network.http.phishy-userpass-length value: 255 

添加參數FF about:config中。關於其他瀏覽器我不確定。

+0

我有以下,但它不工作... \t @Before \t公共無效設置()拋出異常{ \t \t FirefoxProfile ffProfile =新FirefoxProfile(); \t \t ffProfile.setPreference(「network.http.phishy-user pass-length」,255); \t \t driver = new FirefoxDriver(ffProfile); (30,Time Unit.SECONDS);其中, \t} – confusified

+0

道歉糊塗糊...我不知道如何解決它... – confusified