evanmcd
evanmcd

Reputation: 1969

How to resize current browser window in Selenium WebDriver with PHP?

When I try

$this->size(array('width' => 960, 'height' => 400));

I get "BadMethodCallException: The command 'size' is not existent or not supported yet."

I've also tried this

$win = $this->window("")->size(array('width' => 960, 'height' => 400));

but that just gets me a null object.

Upvotes: 1

Views: 1109

Answers (1)

Doran Gao
Doran Gao

Reputation: 11

You may try the methold currentWindow()

$win=$this->currentWindow(); $win->size(array('width' => 960, 'height' => 400));

Upvotes: 1

Related Questions