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

Maximise window of browser #347

Open
djjohnjosephuk opened this issue Aug 14, 2015 · 4 comments
Open

Maximise window of browser #347

djjohnjosephuk opened this issue Aug 14, 2015 · 4 comments

Comments

@djjohnjosephuk
Copy link

Hi,

I'm running my selenium tests under a headless IE browser on windows, and am taking screenshots on error/failures. One thing with this is the browser window that is being opened is a half minimised window, and the currentScreenshot method only seems to take the visible screen rather than the full browser page - this leaves the error screenshot I have as a small fraction of the actual viewport.

Is there any plan or way to implement the Driver.Manage.Window.Maximise function in web driver, or can this be done already somehow? I did dig through the codebase but couldn't find anything.

@paulbriton
Copy link
Contributor

You can maximize the browser window like this : this->prepareSession()->currentWindow()->maximize();

Hope this helps

@techhemant
Copy link

It doesn't work with Chromedriver.

@techhemant
Copy link

This worked for me.
$this->currentWindow()->size(array(
'width' => 1920,
'height' => 1080,
));

@oldFuryBird
Copy link

$this->currentWindow()->maximize();
This worked for me!

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

4 participants