Unsure how to use selenium/standalone-chrome

807 views
Skip to first unread message

James Rawlings

unread,
May 10, 2015, 12:39:58 PM5/10/15
to seleniu...@googlegroups.com
Hi, I've been trying to work with the selenium/standalone-chrome docker image but I think I'm miss understanding how to use it.  I've created a test project that uses selenium-webdriver..


which attempts to connect to the selenium server that's running in the standalone-chrome container but after 60 secs I receive this error..

UnknownError: unknown error: Chrome failed to start: crashed

Full stacktrace, the javascript and dockerfile are on the github repo link above, any help or suggestions would be gratefully received as I've not found any examples of using these docker images.

Thanks, James.

James Rawlings

unread,
May 10, 2015, 3:10:13 PM5/10/15
to seleniu...@googlegroups.com
I've managed to get it going by running the selenium/standalone-chrome image as privileged, a bit of reading suggested I wouldn't need that if I run the tests with the no-sandbox chrome option but I don't think the way I'm adding this is correct or being used correctly.  


var chromeOptions = {
    'args': ['--no-sandbox']
};

chromeCapabilities.set('chromeOptions', chromeOptions);

var driver = new webdriver.Builder()
                .forBrowser('chrome')
                .withCapabilities(chromeCapabilities)
                .usingServer('http://' + host + ':' + port + '/wd/hub')
                .build(); 

Should this work or can someone tell me how I can set the --no-sandbox chrome option correctly to avoid running the standalone-chrome image as privileged please?
Reply all
Reply to author
Forward
0 new messages