Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 408
James Bowler Avatar asked Jun 20 '26 11:06

James Bowler


1 Answers

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

use \Facebook\WebDriver\WebDriverWindow;

$this->webDriver->manage()->window()->maximize();
like image 194
thyme-87 Avatar answered Jun 22 '26 23:06

thyme-87