File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -390,6 +390,30 @@ $client = self::createPantherClient([
390390* ` PANTHER_FIREFOX_ARGUMENTS ` : to customize Firefox arguments. You need to set ` PANTHER_NO_HEADLESS ` to ` 1 ` value to have full control over arguments.
391391* ` PANTHER_FIREFOX_BINARY ` : to use another ` firefox ` binary
392392
393+ ### Changing the Size of the Browser Window
394+
395+ It's possible to control the size of the browser window.
396+ This also controls the size of the screenshots.
397+
398+
399+ Chrome:
400+
401+ ``` php
402+ $client = Client::createChromeClient(null, ['--window-size=1500,4000']);
403+ ```
404+
405+ Or using the ` PANTHER_CHROME_ARGUMENTS ` environment variable: ` PANTHER_CHROME_ARGUMENTS='--window-size=1500,4000' `
406+
407+ Firefox:
408+
409+ ``` php
410+ use Facebook\WebDriver\WebDriverDimension;
411+
412+ $client = Client::createFirefoxClient();
413+ $size = new WebDriverDimension(1500, 4000);
414+ $client->manage()->window()->setSize($size);
415+ ```
416+
393417### Accessing To Hidden Text
394418
395419According to the spec, WebDriver implementations return only the ** displayed** text by default.
You can’t perform that action at this time.
0 commit comments