I am using Selenium::Remote::Driver module. I am trying to maximize/minimize the browser window using perl language. I can set the window size to a particular coordinates but not fully maximized and minimized. So please help me to do this. My code is as below:
maximize.pl
use strict;
use warnings;
use Selenium::Remote::Driver;
my $driver = new Selenium::Remote::Driver;
$driver->get("https://www.google.co.in/");
$driver->set_implicit_wait_timeout(40000);
$driver->set_window_size($driver->screenwidth, $driver->screenheight,'current');
Here I am getting error as "Can't locate object method "screenwidth" via package "Selenium::Remote::Driver"
Can you please suggest me how to maximize or minimize the browser window using selenium remote driver?
code edit:
$driver->set_window_size(1920, 1680,'current');
Sorry it is typo and should be like this and 1920 and 1680 are the dimensions which we are passing but what happened is window is not fitting to the screen not maximizing completely
screenwidth...so where is it supposed to come from? - Arran