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

Adding window-size #461

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

ThomasLandauer
Copy link
Contributor

I haven't tested Chrome; it's taken from #428 (which can be closed now IMO)
Firefox works for me; it's taken from https://stackoverflow.com/a/64374604/1668200

I haven't tested Chrome; it's taken from symfony#428 (which can be closed now IMO)
Firefox works for me; it's taken from https://stackoverflow.com/a/64374604/1668200
```
Firefox:
```php
use Facebook\WebDriver\WebDriverDimension;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing the --window-size argument to createFirefoxClient() should work isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, doing a quick check, this is not working for me:

$client = Client::createFirefoxClient(null, ['--window-size=2500,4000']]);

At least the screenshot I'm getting is smaller (1280x955)

I can't remember exactly, but I guess that I did try this first, when I wrote the PR. If it would have been that easy, I wouldn't have dug out the $client->manage()->window()->setSize($size); way...

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found this while googling for the window size setting.

$size = new WebDriverDimension(1500, 2000);
$client->manage()->window()->setSize($size);

worked for me

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
ThomasLandauer and others added 6 commits July 12, 2021 19:06
Co-authored-by: Kévin Dunglas <[email protected]>
Co-authored-by: Kévin Dunglas <[email protected]>
Co-authored-by: Kévin Dunglas <[email protected]>
Co-authored-by: Kévin Dunglas <[email protected]>
Co-authored-by: Kévin Dunglas <[email protected]>
Co-authored-by: Kévin Dunglas <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants