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

Is it possible to do it Chrome with headless? #4641

Closed
p3x-robot opened this Issue Dec 24, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@p3x-robot
Copy link

p3x-robot commented Dec 24, 2017

Ciao!

How are you? Merry XMAS!

Just a small question, I use in my server but I try to use with Chrome, given by now it is headless as well. Is there a scenario or settings to make it totally headless like PhantomJS with Protractor?

Thanks,
Patrik

@husseinkorly

This comment has been minimized.

Copy link

husseinkorly commented Dec 24, 2017

are you trying to run your protractor tests with headless Chrome ? you can do something like this:
capabilities: { browserName: 'chrome', chromeOptions: { args: [ "--headless", "--disable-gpu", "--window-size=800,600"] } }
I I will recommend to post your question on Gitter Channel

@p3x-robot

This comment has been minimized.

Copy link

p3x-robot commented Dec 25, 2017

Ciao!
Thanks so much!
My last question is:

Grunt

    const protractor = {
        watch: {
            'cory-angular-protractor': {
                options: {
                    reload: true
                },
                files: folder.files.all,
                tasks: ['protractor:cory-angular-chrome']
            }
        },
        protractor: {
            options: {
                configFile: path.resolve(`${__dirname}/../../protractor/angular.js`),
            },
            'cory-angular-chrome': {
                options: {
                    args: {
                        baseUrl: `http://localhost:${port}`,
                        browser: 'chrome',
                        specs: [
                            `${folder.test.angularProtractor.root}**/*.js`
                        ]
                    }
                }
            },
        },
    };

Protractor

It is in protractor/angular.js.

exports.config = {
    specs: [
        'test/angular-protractor/**/*.js'
    ],
};

Where do I put in? In the configFile or the options in cory-angular-chrome ?

@p3x-robot

This comment has been minimized.

Copy link

p3x-robot commented Dec 25, 2017

Ok, got it, thanks so much!

@p3x-robot p3x-robot closed this Dec 25, 2017

@p3x-robot

This comment has been minimized.

Copy link

p3x-robot commented Dec 25, 2017

It was in:

exports.config = {
    specs: [
        'test/angular-protractor/**/*.js'
    ],
    capabilities: {
        browserName: 'chrome',

        chromeOptions: {
            args: [ "--headless", "--disable-gpu", "--window-size=800,600" ]
        }
    }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment