2013-04-14 69 views
0

我已閱讀了如何使用selenium-server RC執行selenium IDE testcase.html。這是我如何把它設置...如何使用Windows CMD與Firefox運行Selenium IDE testcase.html

C:\Selenium_Server\selenium-server.jar 
C:\Scripts\Q2Nightly.html 

如果我打開Firefox和打開與硒IDE的測試用例,它將會運行得很好。從命令行執行它不適用於我,我需要它作爲自動批處理文件的一部分。

這裏是我使用的命令:

java.exe -jar C:\selenium_server\selenium-server.jar -htmlSuite "*firefox" "http://127.0.0.1" "c:\Scripts\Q2Nightly.html" "c:\Scripts\results-firefox.html" -port 5555 

CMD輸出

Apr 14, 2013 11:32:33 AM org.openqa.grid.selenium.GridLauncher main 
INFO: Launching a standalone server 
11:32:34.661 INFO - Java: Sun Microsystems Inc. 20.9-b04 
11:32:34.662 INFO - OS: Windows 7 6.1 x86 
11:32:34.667 INFO - v2.32.0, with Core v2.32.0. Built from revision 6c40c18 
11:32:34.731 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:5555/wd/hub 
11:32:34.732 INFO - Version Jetty/5.1.x 
11:32:34.732 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver] 
11:32:34.733 INFO - Started HttpContext[/selenium-server,/selenium-server] 
11:32:34.733 INFO - Started HttpContext[/,/] 
11:32:34.755 INFO - Started [email protected] 
11:32:34.756 INFO - Started HttpContext[/wd,/wd] 
11:32:34.758 INFO - Started SocketListener on 0.0.0.0:5555 
11:32:34.758 INFO - Started [email protected] 
jar:file:/C:/Selenium_Server/selenium-server.jar!/customProfileDirCUSTFFCHROME 
11:32:34.857 INFO - Preparing Firefox profile... 
11:32:36.008 INFO - Launching Firefox... 
11:32:36.967 INFO - Checking Resource aliases 

兩個Firefox窗口的屏幕快照打開:

http://s116.photobucket.com/user/xXxghaleonxXx/media/Selenium_Automated_zps11713a8a.png.html?sort=3&o=0

這什麼也沒有發生之後。測試用例不執行,甚至手動運行按鈕也不起作用。任何人都可以幫忙嗎?

回答

2

保存Q2Nightly.html作爲測試套件不作爲測試案例。這將解決問題。

+0

太棒了!這工作非常感謝。現在我只需要找出如何自動化驗證檢查彈出。但我想這是另一個問題。 –

+0

通過驗證檢查,你的意思是要求輸入用戶名和密碼的窗口對話框? – Hemanth

+0

http://stackoverflow.com/questions/16023869/how-to-automate-username-password-fill-for-firefox-authentication-popup-using-se 我能找到答案。這是一個「驗證需要」的彈出窗口 –

相關問題