簡體   English   中英

聚合物Web組件測試儀(WCT)XVFB無法連接到硒

[英]Polymer Webcomponent Tester (WCT) XVFB unable to connect to selenium

當我們使用XVFB加載WCT測試時,我在ubuntu上收到此錯誤。 然而,當我們第二次運行失敗時,測試會第一次完成。 看起來像它缺少HTMLunit驅動程序。 我嘗試安裝單元驅動程序,但無法修復。

xvfb-run wct --skip-selenium-install 在此輸入圖像描述

我做了三件事來完成這項工作。 它們可能不是完美的解決方案,因為它有點hacky。

  1. 下載https://selenium-release.storage.googleapis.com/2.52/selenium-server-standalone-2.52.0.jar並將其復制到/ usr / local / lib / node_modules / web-component-tester / node_modules / selenium -standalone / .selenium / selenium-server / 2.52.0-server.jar(您可能需要更改路徑以適合您的服務器)。

  2. 修改/usr/local/lib/node_modules/web-component-tester/node_modules/selenium-standalone/lib/default-config.js將selenium獨立服務器版本從2.53.1更改為2.52.0(這將解決HtmlUnitDriver未注冊問題)

  3. 修改/usr/local/lib/node_modules/web-component-tester/node_modules/selenium-standalone/lib/check-started.js以更改“var maxRetries = 60 * 1000 / retryInterval;” 是“var maxRetries = 600 * 1000 / retryInterval;” (這將解決超時問題)

在進行了上述黑客攻擊后,您可以運行wct或xvfb-run wct。 只需要再等一會兒,你就會看到你的測試結果。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM