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

Make initialisation consistent for Selenium and non-Selenium drivers #43

Closed
xurizaemon opened this issue Jul 5, 2021 · 1 comment · Fixed by #144
Closed

Make initialisation consistent for Selenium and non-Selenium drivers #43

xurizaemon opened this issue Jul 5, 2021 · 1 comment · Fixed by #144
Milestone

Comments

@xurizaemon
Copy link
Contributor

Looking at #30 today I noticed an inconsistency in behaviour (I think).

https://github.com/integratedexperts/behat-screenshot/blob/master/src/IntegratedExperts/BehatScreenshotExtension/Context/ScreenshotContext.php#L73-L92

This checks instanceof Selenium2Driver and fires $driver->start() then does a resize. However, not all drivers that support screenshots are Selenium2Driver (eg DMore/chrome-mink-driver's ChromeDriver.

So ChromeDriver retains resized dimensions between runs (until Chrome exits), while Selenium is consistent. That's not a problem for me - but to implement initial size from behat.yml config in that function for drivers other than Selenium2, we'd need to have that function accommodate those other drivers too.

@xurizaemon xurizaemon changed the title Initial screensize inconsistency in non-Selenium drivers Make initialisation consistent for Selenium and non-Selenium drivers Jul 5, 2021
@AlexSkrypnyk
Copy link
Member

Agree. The codebase does not do it well.

We should not only add a better check, but also have multiple different drivers setup in CI to make sure that this extension works with all of them correctly.

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

Successfully merging a pull request may close this issue.

2 participants