How to get the Current window Size using Selenium Webdriver?

后端 未结 4 667
粉色の甜心
粉色の甜心 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

        Dimension initial_size = driver.manage().window().getSize();
        int height = initial_size.getHeight();
        int width = initial_size.getWidth();
    

提交回复
热议问题