2016-08-16 147 views
0

我用robotframework開發了我的測試,現在我想把它們放在CI中。 在我的CI plateforme中,我沒有導航器,所以我使用phantomJs我的問題是幻影沒有打開我的網站,但它給了我白頁。 我使用此代碼,打開我的網站用phantomJs執行機器人框架測試

Open Browser ${myURL} phantomjs 

我做了一些研究,我發現這個鏈接https://github.com/pa11y/pa11y/issues/90該提議嘗試與捲曲打開該網站。捲曲的執行返回

curl: (60) SSL certificate problem: self signed certificate 
More details here: https://curl.haxx.se/docs/sslcerts.html 

curl performs SSL certificate verification by default, using a "bundle" 
of Certificate Authority (CA) public keys (CA certs). If the default 
bundle file isn't adequate, you can specify an alternate file 
using the --cacert option. 
If this HTTPS server uses a certificate signed by a CA represented in 
the bundle, the certificate verification probably failed due to a 
problem with the certificate (it might be expired, or the name might 
not match the domain name in the URL). 
If you'd like to turn off curl's verification of the certificate, use 
the -k (or --insecure) option. 

所以我啓動我phantomJs與COMMANDE phantomjs --ignore-ssl-errors=true --ssl-protocol=any --webdriver=8010,但我仍然有同樣的問題的任何幫助,請。

+0

您使用哪個PhantomJS版本?您是否試圖將'--web-security = false'添加爲PhantomJS的命令行選項? –

+0

我有phantomJs 2.1.1,是的,我嘗試過。 – Sabrin

回答

1

我解決我的問題,通過與COMMANDE

phantomjs --ignore-ssl-errors=true --ssl-protocol=any --webdriver=8010 

推出phantomJs和改變我的測試,以

${desired capabilities}= Evaluate {'phantomjs.page.settings.userAgent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36'} 

Open Browser ${URL} phantomjs main browser http://localhost:8010 desired_capabilities=${desired capabilities} 

我發現http://spage.fi/phantomjs

的迴應,我希望能幫助一些一。

相關問題