Thrillofit86
Thrillofit86

Reputation: 619

How to configure browserstack with protractor and mocha

so I am trying to figure out how to config more correctly with mobile and aswell with desktop. Before I explain my issue, I am using this code:

let SpecReporter = require('mochawesome').SpecReporter;

exports.config = {

    "browserstackUser": "helloworld",
    "browserstackKey": "123456789",

    multiCapabilities: [

        //{
        //  browserName: 'Android',
        //  device: 'Google Pixel 4 XL',
        //  os_version: '10.0',
        //  real_mobile: "true",
        //  project: "Selenium-Test",
        //  build: "Build T-Hour",
        //  name: "Pixel 4 XL Android - Happy Flow"
        //},

        {
            browserName: 'Chrome',
            device: 'Samsung Galaxy S9 Plus',
            os_version: '9.0',
            real_mobile: "true",
            project: "Selenium-Test",
            build: "Build T-Hour",
            name: "Samsung Galaxy S9 Plus Chrome - Happy Flow"
        }


    ],

    maxSessions: 1,

    mochaOpts: {
        reporter: "mochawesome",
        timeout: 60000,
    },

    suites: {
        all: 'pagesMobile/*.js',
    },

    framework: 'mocha',

};

As you can see I have different multiCapabilities where I can add on different browsers whenever I want to test.

However my issue is that I do feel like I am doing it incorrectly because I have entered browserName : Chrome to test on however it still does Samsung browser instead and I am not sure what I am doing wrong anymore.

I do feel like I have set it up incorrectly and I am here asking what I am doing wrong that it doesn't want to run Chrome as a browser from Mobile and also if there is someone that is willing to tell me what I can improve aswell.

Upvotes: 0

Views: 93

Answers (1)

ANM1996
ANM1996

Reputation: 161

BrowserStack currently supports only the Chrome Browser on Android and the Safari Browser on iOS real mobile devices. So, your tests on the Samsung Mobile devices should execute on the Chrome Browser by default.

Upvotes: 1

Related Questions