I recently started running Selenium WebDriver
on a new 24 inch monitor. Previously, I ran it from a 15 inch screen. I need the browser dimensions to be the same size as I ran it before (I've always ran it in maximized mode). Since I currently have a 24 inch screen maximized mode means browser would much larger than it was previously which is not desired since it needs to be the same size as browser when run on 15 inch screen.
I'm currently using:
driver.manage().window().setSize(dimensions)
to set the size of Selenium browser to the same size it was when running in maximized mode on my 15 inch screen. The dimensions shown on my 15 inch screen is: Height: 837 Width: 1549. I've set the same dimensions on 24 inch screen but even though Selenium prints the said dimensions when calling getHeight + getWidth
in reality the browser looks much bigger (I compared it side by side with my 15 inch screen).
Why is this so?