Dulcie @ 2021 By : Template Sell.

Tag: phantomjs

[centOS] 安裝 phantomjs 錯誤,phantomjs: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory

在 centOS 上面安裝 phantomjs 遇到了以下的錯誤 phantomjs: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory 這是因為缺少 phantomjs 的相依套件 解決方法: 參考資料: http://sameerhalai.com/blog/how-to-install-phantomjs-on-a-centos-server/

[test] Nightwatch.js debug 血淚史

前情提要: 本篇使用 [email protected] ((3.5.0以上會有不同的問題… 使用 Nightwatch.js 寫前端的 E2E test一段時間了…踩了不少雷 Nightwatch 底下還是使用 selenium 與 支援各瀏覽器的 webdriver ,其實大多狀況都是發生在各 web driver 跟 selenium….啊(嘆~ 來記錄一下使用 Nightwatch.js 遇到的幾個問題~ selenium: Error retrieving a new session from the selenium server Connection refused! Is selenium server started? …. 最常出現以上這個訊息,可以先試著單獨開啟 selenium 在預設 port 4444,透過瀏覽器手動創建 session 確認 selenium 有正常運作。 java -jar selenium-server-standalone-{VERSION}.jar 另外,如果要透過 nightwatch.js 自動開啟 selenium,記得要將 nightwatch.json 設定檔中的 selectium start_process 設為 […]