applitools / Eyes.Sdk.JavaScript

Applitools SDK for Selenium 3. This repository is deprecated. It has moved to https://github.com/applitools/eyes.sdk.javascript1/tree/master/packages/eyes-selenium-3
6 stars 17 forks source link

BUG: Changing Viewport size with Eyes.open affects subsequent tests (Eyes.open calls) #63

Closed hepiyellow closed 5 years ago

hepiyellow commented 5 years ago

I added a test that sets the Viewport size using the Eyes.Open optional 4th argument, and set a width of 500px.

https://applitools.com/docs/api/eyes-sdk/classes-gen/class_eyes/method-eyes-open-selenium-javascript.html

It seems that it affect subsequent tests’ baselines, which are set with width 500px as well, Although I did NOT pass any ‘viewportSize` in their Eyes.open call.

Looking at the Logs:

I see in the Eyes.SDK debug logs, this suspicious log:

Eyes: last bounds: {"top":0,"left":0,"width":500,"height":1075}

Which sounds like it is “remembering” the viewport size from previous tests. After the test which calls open with the width 500px, Then all subsequent tests have the SessionStart called with width 500px:

Eyes: ServerConnector.startSession called with: {…,…, "displaySize":{"width":500,"height":1075},…}

This is not according to Docs, which say that:

Defines the viewport size of the browser that will be set before the start of the test. If this parameter is not provided then the viewport size will be based on the default browser window size. See Using viewports in Eyes for more details.

Please, file a bug report on my behalf. Is there a link where I can follow the handling of this bug?

As a work around, I am going to pass the viewport size in ALL Eyes.open calls.

I have a full Eyes.SDK debug log file for this. I can't attach it here because it has the API key.

Contact me if you need it.

astappiev commented 5 years ago

Ping @danielputerman

danielputerman commented 5 years ago

@hepiyellow I missed this. Closing this for now? If it's still relevant, I'll re-open.

0153057 commented 4 years ago

Hi hepiyellow, I wanted to run my test scripts for different view port size. How to configure for each test different port size. Can we add that in the test level. If yes, kindly show me how to do that ?

Thanks, Sam