2011-11-10 7 views
2

ローカルに保存されたカスタムfirefoxプロファイルを使用して、クライアントでremotewebdriverテストを開始しようとしています。私はグリッドを設定していません、私はちょうどセレンのスタンドアロンのサーバーを実行しているクライアントと通信しようとしています。selenium-standalone-serverでカスタムfirefoxプロファイルを使用しているときに無効なエントリサイズエラー

次のスニペットは、WebDriverを初期化する方法です。私は、テストを開始すると

DesiredCapabilities caps = new DesiredCapabilities(); 
FirefoxProfile profile = new FirefoxProfile("path_of_profile"); 
profile.AcceptUntrstedCertificates = false; 
caps.SetCapability("firefox_profile", profile.ToBase64String()); 
_driver = new RemoteWebDriver(new Uri("http://remoteClientIP:4444/wd/hub"), caps); 

、私は次のエラーを取得: 無効なエントリサイズ(10485760を期待するが、得た10289152バイト)以下のスタックトレースを

at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(DriverCommand driverCommandToExecute, Dictionary``2 parameters) at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities, TimeSpan commandTimeout) at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities)

答えて

2

あなたの使用している場合RemoteWebDriverブラウザとバージョンを設定して、Selenium RCがどのブラウザを使用してロードするかを知るようにする必要があります。 コードにこれを追加してみてください:

caps = new DesiredCapabilities(browserName, browserVersion, new Platform(PlatformType.Windows)); 
    caps.SetCapability("firefox_profile", profile.ToBase64String()); 
関連する問題