Skip to content
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

Not able to configure screen height and width for chrome browser in serenity.properties file #3436

Closed
PritiKumari95 opened this issue Apr 12, 2024 · 6 comments

Comments

@PritiKumari95
Copy link

What happened?

Not able to configure screen height and width for chrome browser in serenity.properties file, we tried to set below configuration but its working for firefox but not chrome
// To maximize
chrome.switches = --start-maximized

// To Resize
serenity.browser.width=981
serenity.browser.height=644

What did you expect to happen?

Screen height and width shoul be adjusted as per the configuration

Serenity BDD version

4.0.30

JDK version

11

Execution environment

No response

How to reproduce the bug.

try setting below in serenity.properties file
serenity.browser.width=981
serenity.browser.height=644

How can we make it happen?

Work on this myself and propose a PR (with Serenity BDD team guidance)

@wakaleo
Copy link
Member

wakaleo commented Apr 12, 2024

serenity.properties is deprecated - use serenity.conf instead:

serenity {
  browser {
    width = 981
    height = 644
  }
  ...

@PritiKumari95
Copy link
Author

As suggested i tried the above lines of code but we still don't see any changes, below is the code we are using to verify the size.
getDriver().manage().window().getSize()

@wakaleo
Copy link
Member

wakaleo commented Apr 16, 2024

Maybe you have some chrome options elsewhere that are overriding the properties? I can confirm that the configuration above works in normal circumstances.

@PritiKumari95
Copy link
Author

i am usin --start-maximized in chrome options, does this has anything to do with the default size i am getting?

@wakaleo
Copy link
Member

wakaleo commented Apr 16, 2024

Yes, that will start the browser in maximized mode, overriding any browser size settings.

@wakaleo
Copy link
Member

wakaleo commented Apr 21, 2024

Closing presumed resolved

@wakaleo wakaleo closed this as completed Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants