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

maximize_window() command does not work with NeedleDriver #18

Closed
derekcharles opened this issue Jul 16, 2019 · 1 comment
Closed

maximize_window() command does not work with NeedleDriver #18

derekcharles opened this issue Jul 16, 2019 · 1 comment

Comments

@derekcharles
Copy link

Expected Behavior

When maximize_window() command is used, Browser is expected to stay in maximized state.

Actual Behavior

Browser collapses into smaller window at the beginning of every pytest script. As a workaround, I must use maximize_window() at the beginning of every script. Also when headless chrome is under the control of NeedleDriver, any arguments to change the browser size does not work.

Steps to Reproduce the Problem

  1. Initialize Browser,
  2. give maximize_window() command using NeedleDriver
  • Browser size will collapse at the beginning of every test.

Specifications

  • Version: pytest-needle 3.11, selenium 3.141
  • Platform: Windows 7
@jlane9
Copy link
Owner

jlane9 commented Jul 17, 2019

@derek-charles I would agree that this should be the default behaviour, however this not an issue with this library and is instead an issue with pytest-selenium (a dependency). pytest-selenium opens a new browser window each test and thus resets its window size state with each test. A few other folks, including myself, have left comments suggesting changing this, but it looks like it'll continue to operate this way.

You could override the selenium fixture with one that's scope is set to session, like suggested here. Remember though you'll also have to create an override for needle as well, since the two are tied.

@jlane9 jlane9 closed this as completed Jul 17, 2019
@jlane9 jlane9 mentioned this issue Jul 17, 2019
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