2016-07-11 7 views
0

そして、私はdockervelドッカー環境でLaravel AngularJsを実行しています。Laravel AngularJS分度器 - テスト中にクロムブラウザが起動しない

私は分度器https://hub.docker.com/r/webnicer/protractor-headless/にこのドッカー画像を使用しています。私はMyApp/e2e_testフォルダにイメージを引っ張りました。そこにspec.jsとconf.jsファイルがあります。

spec.js

describe('Protractor Demo App', function() { 
    it('should fill the form', function() { 
    browser.get('http://localhost/'); 
    browser.debugger(); 
    //browser.pause(); 
    element(by.model('user1Data.name')).sendKeys('haja'); 
    element(by.model('user1Data.email')).sendKeys('[email protected]'); 
    element(by.model('user1Data.phone_number')).sendKeys('12345'); 
    element(by.id('register')).click(); 

    expect(element(by.id('thank')).isDisplayed()).toBe(true); 

    }); 
}); 

conf.js

exports.config = { 
    framework: 'jasmine', 
    capabilities: { 
    'browserName': 'chrome' 
    }, 
    specs: ['spec.js'] 
} 

コンソールautput:

docker run -it --privileged --rm --net=host -v /dev/shm:/dev/shm -v $(pwd):/protractor webnicer/protractor-headless conf.js 
[20:43:27] I/local - Starting selenium standalone server... 
[20:43:27] I/launcher - Running 1 instances of WebDriver 
[20:43:28] I/local - Selenium standalone server started at http://192.168.1.69:34981/wd/hub 
Started 
. 



1 spec, 0 failures 
Finished in 3.843 seconds 
[20:43:40] I/local - Shutting down selenium standalone server. 
[20:43:40] I/launcher - 0 instance(s) of WebDriver still running 
[20:43:40] I/launcher - chrome #01 passed 

Chromeブラウザが表示されません。

答えて

0

何も問題はありません。すべてとすべてが宣伝されているように働いています!

なぜですか?

ヘッドレスは、(実際の)表示が全くないことを意味します。より鮮明に:これは仮想メモリ内表示です。

実際にディスプレイを見る必要がある場合は、VNCアクセスを提供するDockerイメージを探します。

関連する問題