2016-08-16 3 views
0

Я разработал свои тесты с помощью robotframework, и теперь я хочу поместить их в CI. В моем пластинке CI у меня нет навигатора, поэтому я использую phantomJs, моя проблема в том, что фантомы не открывают мой сайт, но он дает мне белую страницу. Я использую этот код, чтобы открыть мой сайтВыполнение теста robotframework с 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

я решил мою проблему, запустив phantomJs с COMMANDE

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

и меняю тест

${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

Я надеюсь, что может помочь кто-то ,

Смежные вопросы