How to resize/maximize Firefox window during launching Selenium Remote Control?

后端 未结 9 1294
眼角桃花
眼角桃花 2020-12-14 07:47

I am using Selenium Remote Control . During executing the tests the actual Firefox window is so small. I want it full screen so I can see what is happening. How can I maximi

9条回答
  •  孤城傲影
    2020-12-14 08:07

    Try the windowMaximize command:

    selenium.windowMaximize();
    

    You can also set a specific width and height using the following command:

    selenium.getEval("window.resizeTo(X, Y); window.moveTo(0,0);")
    

    Where X is the width and Y is the height.

提交回复
热议问题