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

Adjust Window for Firefox driver #573

Open
nrshoukhin opened this issue Oct 6, 2022 · 1 comment
Open

Adjust Window for Firefox driver #573

nrshoukhin opened this issue Oct 6, 2022 · 1 comment

Comments

@nrshoukhin
Copy link

How can I adjust window and take screenshot using Firefox driver?

@carranzpibisi
Copy link

carranzpibisi commented Sep 19, 2023

It works for me:

$client = Client::createFirefoxClient('/usr/local/bin/geckodriver');

$width=1920;
$height=1080;
$size = new WebDriverDimension($width, $height);
$client->manage()->window()->maximize()->setSize($size);

$screenshot = $client->takeScreenshot();
$base64_screenshot = base64_encode($screenshot);

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