-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
base: main
Are you sure you want to change the base?
Adding window-size #461
Conversation
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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
Co-authored-by: Kévin Dunglas <dunglas@gmail.com>
Co-authored-by: Kévin Dunglas <dunglas@gmail.com>
Co-authored-by: Kévin Dunglas <dunglas@gmail.com>
Co-authored-by: Kévin Dunglas <dunglas@gmail.com>
Co-authored-by: Kévin Dunglas <dunglas@gmail.com>
Co-authored-by: Kévin Dunglas <dunglas@gmail.com>
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