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

Selenide should NOT maximize browser by default #810

Closed
asolntsev opened this Issue Sep 24, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@asolntsev
Copy link
Contributor

asolntsev commented Sep 24, 2018

The problem

Currently Selenide starts browser "maximized" (makes browser window as big as screen size).
It has two problems:

  1. It takes time
  2. it can cause flaky tests because screen size can vary depending on environment, XVFB settings, headless mode etc.

Solution

I suggest to turn Configuration.startMaximized setting to false by default.
Instead, I recommend to set browser window size explicitly by using Configuration.browserSize=1024x768 (a minimal browser size that your application should support).

@asolntsev asolntsev self-assigned this Sep 24, 2018

@asolntsev asolntsev added this to the 5.0.0 milestone Sep 24, 2018

@BorisOsipov

This comment has been minimized.

Copy link
Member

BorisOsipov commented Sep 24, 2018

+1

@rosolko

This comment has been minimized.

Copy link
Collaborator

rosolko commented Sep 24, 2018

@asolntsev @BorisOsipov I think we also should remove chrome maximize cheat and transfer any maximize operations to client code. What do you think?

@BorisOsipov

This comment has been minimized.

Copy link
Member

BorisOsipov commented Sep 24, 2018

I am not sure.
@rosolko Does chrome maximize cheat really work now? I guess if we remove it will be hard to guess for someone why tests start failing.

@rosolko

This comment has been minimized.

Copy link
Collaborator

rosolko commented Sep 24, 2018

@BorisOsipov I think yes why not. It's just set browser size to screen size and set position to 0x0

@rosolko

This comment has been minimized.

Copy link
Collaborator

rosolko commented Sep 25, 2018

@asolntsev @BorisOsipov I'm also suggest to set default browserPosition with 25x25 or even 30x30 value.

To avoid 2 problems:

  1. Creating browser outside screen viewport
  2. Creating browser under some OS elements such docks and tiles on linux and macos

rosolko added a commit to rosolko/selenide that referenced this issue Sep 25, 2018

Set chrome as default browser and close selenide#811.
Do not maximize browser by default and close selenide#810.
Set default browser size to 1024x768.
Set default browser position to 30x30.
Style all configuration with camelCase format.
Remove deprecate from internet explorer IE alias.

@rosolko rosolko referenced this issue Sep 25, 2018

Merged

Configuration cleanup and refactoring. #812

0 of 3 tasks complete
@asolntsev

This comment has been minimized.

Copy link
Contributor

asolntsev commented Sep 26, 2018

@rosolko @BorisOsipov I am not sure setting 30x30 is a good idea. Because moving the browser takes time. It will make many tests slower.
And it was never needed - at least in my projects.

@rosolko rosolko closed this in #812 Sep 26, 2018

rosolko added a commit that referenced this issue Sep 26, 2018

Configuration cleanup and refactoring. (#812)
Set chrome as default browser and close #811.
Do not maximize browser by default and close #810.
Set default browser size to 1366x768.
Style all configuration with camelCase format.
Remove deprecate from internet explorer IE alias related on feedback from #806.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment