CSS messed up while running protractor on cycling

I have an angular application for which I wrote e2e tests using a protractor. I am doing my tests on saucelabs . For example, there is a small problem with my page. If my browser is not maximized, some of the css will be mixed up (I plan to fix this in the future), and that would certainly end some of my test cases that I wrote.

However, if my browser is maximized, everything is perfect. Now the problem is when I run my test on saucelabs, even if the browser looks maximum (according to saucelab snapshots), my css looks corrupted, as it happens when my browser does not maximize locally.

I did some research and found that I can use

browser.driver.manage().window().maximize();

However, in my case, since the browser is already maximized, do I need to increase the screen resolution or something else? Please provide suggestions

+2
source share
1 answer

I really think that you probably answered this question yourself, proposing to increase the resolution. Because the resolution on your local computer is probably different from the saucelabs solution. I'm not sure what the default permission is, but here are the different permissions you can specify.

I probably agree with the resolution, which, as you know, works on your machine, as well as maximizing the window.

EDIT:

exports.config = {
    framework: 'jasmine2',
    sauceUser: 'blahblhablah',
    sauceKey: 'xyzabcdxyzabac',
    capabilities :  {
            screenResolution: "1280x1024",
        },
    multiCapabilities: multiCapabilities,
    specs: ['e2e/main.spec.js'],
    jasmineNodeOpts: {
        showColors: true,
        defaultTimeoutInterval: 30000
    },
+1

All Articles