Skip to content
This repository has been archived by the owner on Jan 31, 2021. It is now read-only.

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

Closed
hepiyellow opened this issue Jan 27, 2019 · 3 comments

Comments

@hepiyellow
Copy link

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
Copy link
Contributor

Ping @danielputerman

@danielputerman
Copy link
Member

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

@0153057
Copy link

0153057 commented Feb 13, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants