2017-08-02 12 views
0

私はWindowsコマンドプロンプトで以下のハブとノードコマンドを実行しました。 http://localhost:4441/grid/consoleSeleniumグリッドは動作しません

C:\seleniumserver\java -jar selenium-server-standalone-3.4.0.jar -role hub -port 4441 

C:\seleniumserver\java -jar selenium-server-standalone-3.4.0.ja -role wd -hub http://localhost:4441/grid/register 

マイオートメーションコードは、次のC#コードを持っているを参照するとき、私は、グリッドのコンソールを取得するように私はこれが機能している見ることができます。

C#のコードスニペット

var capabilities = DesiredCapabilities.Chrome(); 
capabilities.Platform = Platform.CurrentPlatform; 
IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), capabilities); 

私は、次のエラーメッセージ

エラーメッセージは、私は何の任意の提案

An exception of type 'OpenQA.Selenium.WebDriverException' occurred in WebDriver.dll but was not handled in user code 

Additional information: The HTTP request to the remote WebDriver server for URL http://localhost:4444/wd/hub/session timed out after 60 seconds. 

を受け得る自動化を実行して実行すると間違ってやって?初めてコメント

は、次のように変更OpenQA.Selenium.Remote.RemoteWebDriverで

 var capabilities = DesiredCapabilities.Chrome(); 
     capabilities.Platform = Platform.CurrentPlatform; 
     IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4441/wd/hub"), capabilities); 

エラーメッセージ

をした後

多くのおかげで、

アップデートをこの設定.UnpackAndThrowOnError(Response errorResponse):OpenQA.Selenium.Remote.RemoteWebDriver.Execute OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapand desiredCapabilities)のOpenQA.Selenium.Remote.RemoteWebDriverのOpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor、ICapabilities desiredCapabilities)の文字列driverCommandToExecute、Dictionary`2パラメータC:\ Projects \ UAT Automationの... ctor()の43行目のc:\ Projects \ UAT Automation \ myfile.csのmyfile.ctor()のctor(Uri remoteAddress、ICapabilities desiredCapabilities)ライン21

答えて

1

あなたはポート4441であなたのハブを始めていますが、使用して4444に接続しようとしている

IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), capabilities);

IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4441/wd/hub"), capabilities);

にあなたのインスタンス生成コードを変更して、もう一度お試しください。

+0

エラーが発生しました。私の質問にエラーメッセージが追加されました。「コメント後のアップデート」セクションを参照してください。 – user7558986

+0

別のバージョンのセレンを試そうとしますか? – user7558986

+0

ノードが稼動しているマシンのPATHにクロムドライバがあるかどうか知っていますか?あなたはあなたが見ているものを見るためにノードのログを見ましたか? Btw、私の答えを受け入れるようにしてください。それは、あなたの最初の「接続タイムアウト」の問題に答えたからです。 –

関連する問題