How to get the Current window Size using Selenium Webdriver?

后端 未结 4 614
粉色の甜心
粉色の甜心 2021-01-12 20:25

I am running on Screen Resolution of (1366 X 768 ), but when I call getSize().getWidth() and getSize().getHeight() methods , the result I\'m gettin

4条回答
  •  再見小時候
    2021-01-12 21:23

    The screen resolution and browser window size are not necessarily equal.

    Resolution (from wikipedia) is

    The display resolution or display modes of a digital television, computer monitor or display device is the number of distinct pixels in each dimension that can be displayed ... "1024 × 768" means the width is 1024 pixels and the height is 768 pixels

    While getSize() is returning the actual browser size.

提交回复
热议问题