2010-12-16 6 views
-1

私は1つのテストケースを書く私はそのケースを実行しようとしているが、その示すエラー ています。これは、JUnitを用いた私のサンプルテストケースである:セレンサーバーの問題

公共ボイドのsetUp()は例外 { seleniumServer =スロー新しいSeleniumServer(); seleniumServer.start(); selenium.start(); }

public void testCase1() throws Exception { 
    selenium.open("/jaidproj/home.jsp"); 
    selenium.click("//ul[@id='navigation']/li[2]/a/span[2]"); 
    selenium.waitForPageToLoad("30000"); 
    selenium.click("//div[@id='sidebar-a']/table/tbody/tr[1]/td/a[3]"); 
    selenium.waitForPageToLoad("30000"); 
    selenium.click("//ul[@id='navigation']/li[4]/a/span[2]"); 
    selenium.waitForPageToLoad("30000"); 
    selenium.click("//ul[@id='navigation']/li[5]/a/span[2]"); 
    selenium.waitForPageToLoad("30000"); 
    selenium.type("name", "dsagasg"); 
    selenium.type("email", "[email protected]"); 
    selenium.type("contact", "342532235"); 
    selenium.type("comment", "sdfsagasgas"); 
    selenium.click("submit"); 
    selenium.waitForPageToLoad("30000"); 
} 


public void tearDown() throws Exception { 
    selenium.stop(); 
} 

}

// 私はまた、Javaビルド・パスのjarファイルで更新..

しかし、実行時にその示すエラーが

以下のエラーを参照してください* 開始できませんでした:[email protected]:4444 * これに関しては、いずれかの助けができます。

ありがとうございます。

+0

詳細情報を投稿してください。完全なスタックトレースと同様です。 – Ladlestein

答えて

0

は、私は、ブラウザで以下の行を入力して、テストケースの実行を終了後

+0

ありがとうfarheen ... – shaik

+0

2番目のテストケースを実行しているときに1番目のテストケースが成功していますが、同じエラーが表示されています....正確なプロンプラムは何ですか..... – shaik

1

は、サーバーのセッションを閉じます。..あなたのMozilla Firefoxがpath.Pleaseセットにではなく、あなたが成功したテストを実行することができると思い

http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer

+0

これに同意します。サーバーごとに実行します。それとも自分のために簡単にする。コマンドプロンプトからSelenium Serverを起動し、実行させます。これにより、サーバーに問題が発生した場合にトラブルシューティングを避けることができます。 – StefanE

関連する問題