Codeship上的PhantomJs无法打开网址,它始终指向“about:blank”

时间:2016-09-17 05:56:04

标签: symfony continuous-integration phantomjs behat codeship

当我在代码行上运行Phantomjs时,它始终指向about:blank而不是定义的url。 似乎与我在线阅读的--ssl-protocol相关,但即使启用此功能也无效。 当我在本地机器上使用PhantomJS运行测试时,它没有任何问题......

我的设置如下:

# Set php version through phpenv. 5.3, 5.4, 5.5 & 5.6 available
phpenv local 5.6
curl -sSL https://raw.githubusercontent.com/Herod/Work-Utils/master/phantomjs.sh | bash -s
phantomjs -v
phantomjs --debug=true --ssl-protocol=any --ignore-ssl-errors=true --webdriver=4444  2>&1 &
sleep "5"
npm install -g bower
#remove xdebug
rm -f /home/rof/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
# Set environment variables
export SYMFONY_ENV=test
# Copy the parameters.yml.dist
cp app/config/parameters.yml.dist app/config/parameters.yml
composer install --prefer-source --no-interaction --optimize-autoloader
#assets
bower update
#dump assets
bin/console assets:install --symlink
bin/console assetic:dump

我得到的错误是:

 Expected to be on "http://website.lan/app_test.php/login" but found "about:blank" instead (SensioLabs\Behat\PageObjectExtension\PageObject\Exception\UnexpectedPageException)

phantomjs调试的一部分:

2016-09-17T10:12:58 [DEBUG] CookieJar - Created but will not store cookies (use option '--cookies-file=<filename>' to enable persistent cookie storage)
2016-09-17T10:13:00 [DEBUG] Set  "http"  proxy to:  "" : 1080
2016-09-17T10:13:00 [DEBUG] Phantom - execute: Configuration
2016-09-17T10:13:00 [DEBUG]      0 objectName : ""
2016-09-17T10:13:00 [DEBUG]      1 cookiesFile : ""
2016-09-17T10:13:00 [DEBUG]      2 diskCacheEnabled : "false"
2016-09-17T10:13:00 [DEBUG]      3 maxDiskCacheSize : "-1"
2016-09-17T10:13:00 [DEBUG]      4 diskCachePath : ""
2016-09-17T10:13:00 [DEBUG]      5 ignoreSslErrors : "true"
2016-09-17T10:13:00 [DEBUG]      6 localUrlAccessEnabled : "true"
2016-09-17T10:13:00 [DEBUG]      7 localToRemoteUrlAccessEnabled : "false"
2016-09-17T10:13:00 [DEBUG]      8 outputEncoding : "UTF-8"
2016-09-17T10:13:00 [DEBUG]      9 proxyType : "http"
2016-09-17T10:13:00 [DEBUG]      10 proxy : ":1080"
2016-09-17T10:13:00 [DEBUG]      11 proxyAuth : ":"
2016-09-17T10:13:00 [DEBUG]      12 scriptEncoding : "UTF-8"
2016-09-17T10:13:00 [DEBUG]      13 webSecurityEnabled : "true"
2016-09-17T10:13:00 [DEBUG]      14 offlineStoragePath : ""
2016-09-17T10:13:00 [DEBUG]      15 localStoragePath : ""
2016-09-17T10:13:00 [DEBUG]      16 localStorageDefaultQuota : "-1"
2016-09-17T10:13:00 [DEBUG]      17 offlineStorageDefaultQuota : "-1"
2016-09-17T10:13:00 [DEBUG]      18 printDebugMessages : "true"
2016-09-17T10:13:00 [DEBUG]      19 javascriptCanOpenWindows : "true"
2016-09-17T10:13:00 [DEBUG]      20 javascriptCanCloseWindows : "true"
2016-09-17T10:13:00 [DEBUG]      21 sslProtocol : "any"
2016-09-17T10:13:00 [DEBUG]      22 sslCiphers : "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-RC4-SHA:ECDHE-RSA-RC4-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:RC4-SHA:RC4-MD5"
2016-09-17T10:13:00 [DEBUG]      23 sslCertificatesPath : ""
2016-09-17T10:13:00 [DEBUG]      24 sslClientCertificateFile : ""
2016-09-17T10:13:00 [DEBUG]      25 sslClientKeyFile : ""
2016-09-17T10:13:00 [DEBUG]      26 sslClientKeyPassphrase : ""
2016-09-17T10:13:00 [DEBUG]      27 webdriver : ":4444"
2016-09-17T10:13:00 [DEBUG]      28 webdriverLogFile : ""
2016-09-17T10:13:00 [DEBUG]      29 webdriverLogLevel : "INFO"
2016-09-17T10:13:00 [DEBUG]      30 webdriverSeleniumGridHub : ""
2016-09-17T10:13:00 [DEBUG] Phantom - execute: Script & Arguments
2016-09-17T10:13:00 [DEBUG]      script: "main.js"
2016-09-17T10:13:00 [DEBUG]      0 arg: "--ip="
2016-09-17T10:13:00 [DEBUG]      1 arg: "--port=4444"
2016-09-17T10:13:00 [DEBUG]      2 arg: "--logLevel=INFO"
2016-09-17T10:13:00 [DEBUG] Phantom - execute: Starting Remote WebDriver mode
2016-09-17T10:13:00 [DEBUG] WebPage - setupFrame ""

0 个答案:

没有答案