New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat): Enable ability to pass custom capabilities to sauce browsers #15

Merged
merged 1 commit into from Nov 27, 2013

Conversation

Projects
None yet
2 participants
@axemclion
Contributor

axemclion commented Nov 22, 2013

Added the ability to pass custom options to saucelabs.

Example use case -

 customLaunchers: {
            sl_chrome: {
                base: 'SauceLabs',
                browserName: 'chrome',
                chromeOptions: {
                    args: ['--enable-gpu-benchmarking', '--start-maximized', '--enable-thread-composting']
                },
                'disable-popup-handler': true
            },
            sl_firefox: {
                base: 'SauceLabs',
                browserName: 'firefox',
                firefox_profile: fp.encodedSync(),
                'disable-popup-handler': true
            }

The firefox profile is initialized using firefox-profile

var FirefoxProfile = require('firefox-profile');
    var fp = new FirefoxProfile();
    fp.setPreference('dom.send_after_paint_to_content', true);
    fp.setPreference('dom.disable_open_during_load', false);
    fp.setPreference('dom.disable_open_during_load', false);
    fp.updatePreferences();
@vojtajina

View changes

Show outdated Hide outdated index.js
// Adding any other option that was specified in args, but not consumed from above
// Useful for supplying chromeOptions, firefoxProfile, etc.
for (var key in args){
if (typeof options[key] === 'undefined'){

This comment has been minimized.

@vojtajina

vojtajina Nov 24, 2013

Contributor

style: can you please add a space after 'undefined')?

@vojtajina

vojtajina Nov 24, 2013

Contributor

style: can you please add a space after 'undefined')?

@vojtajina

This comment has been minimized.

Show comment
Hide comment
@vojtajina

vojtajina Nov 24, 2013

Contributor

Nice, can you please correct the commit message to feat: ... (the "feat" is not inside parentheses).
Also, can you rebase it on the master, so that I can merge it in? Thanks a bunch @axemclion !

Contributor

vojtajina commented Nov 24, 2013

Nice, can you please correct the commit message to feat: ... (the "feat" is not inside parentheses).
Also, can you rebase it on the master, so that I can merge it in? Thanks a bunch @axemclion !

@axemclion

This comment has been minimized.

Show comment
Hide comment
@axemclion

axemclion Nov 25, 2013

Contributor

Corrected style and commit message.

Contributor

axemclion commented Nov 25, 2013

Corrected style and commit message.

vojtajina added a commit that referenced this pull request Nov 27, 2013

Merge pull request #15 from axemclion/master
(feat): Enable ability to pass custom capabilities to sauce browsers

@vojtajina vojtajina merged commit f131b44 into karma-runner:master Nov 27, 2013

@vojtajina

This comment has been minimized.

Show comment
Hide comment
@vojtajina

vojtajina Nov 27, 2013

Contributor

Thanks @axemclion !

Contributor

vojtajina commented Nov 27, 2013

Thanks @axemclion !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment