1
DesiredCapabilities capability = DesiredCapabilities.Chrome();

IWebDriver wd = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), capability);
wd.Navigate().GoToUrl("http://localhost/");

しかし、私はいつもエラーが発生します

見つかりません: {platform=WINDOWS, javascriptEnabled=true, browserName=chrome, version=}

IEも同様です。FFのみ動作します。Google とフォーラムで検索しましたが、解決策はありません。

http://code.google.com/p/selenium/wiki/GettingStarted

http://code.google.com/p/selenium/wiki/ChromeDriver

Windows7 64ビットを使用しています。

4

1 に答える 1

3

Grid 2.0とWebdriverの組み合わせを使用してgooglechromeでテストを実行するには、ChromeDriverを使用する必要があります。マシンにChromeドライバーをコピー/インストールした後、パラメーターwebdriver.chrome.driverを使用してRCノードを起動する必要があります

java -jar selenium-server.jar -role wd -hub http://localhost:4444/grid/register  -Dwebdriver.chrome.driver=path-to-chromedriver

IEの場合、次のようなノードを起動する必要があります

java -jar selenium-server.jar -role wd -hub http://localhost:4444/grid/register -browser browserName="internet explorer",platform=WINDOWS ensureCleanSession=true
于 2011-08-06T17:23:05.753 に答える