James Bowler
James Bowler

Reputation: 2334

PHP Webdriver - maximize window

I'm using Facebook's PHP Webdriver (Remote Web Driver) and I want to take a screenshot of the 'full page'.

I've tried executeScript and window.resizeTo(1000,1000) - no luck. I still get a very small window in my screenshot.

Upvotes: 2

Views: 3818

Answers (2)

sf lee
sf lee

Reputation: 21

This works:

$options->addArguments(array( '--window-size=1000,1000', '--accept-ssl-certs=true' )); 

Upvotes: 2

thyme-87
thyme-87

Reputation: 101

jbsmooves suggestion is working for Firefox if you load the correct library

use \Facebook\WebDriver\WebDriverWindow;

$this->webDriver->manage()->window()->maximize();

Upvotes: 10

Related Questions