如何调整/启动硒的远程控制过程中最大化Firefox窗口? [英] How to resize/maximize Firefox window during launching Selenium Remote Control?

查看:85
本文介绍了如何调整/启动硒的远程控制过程中最大化Firefox窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用硒的远程控制。在执行测试的实际Firefox窗口是如此之小。我想全屏幕,所以我可以看到发生了什么。我怎样才能最大限度的浏览器屏幕?

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 maximize the browser screen?

推荐答案

尝试windowMaximize命令:

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);")

其中X是宽度和Y是高度

Where X is the width and Y is the height.

这篇关于如何调整/启动硒的远程控制过程中最大化Firefox窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆