我想设置Chrome驱动程序并设置功能以在与webdriverio工具一起使用的配置文件中打开特定的视口宽度X高度。我想要铬的功能选项,以便测试将从该配置开始。
我尝试了以下操作,但工作不正常
我正在使用webdriverIO v5
答案 0 :(得分:0)
browser.setWindowSize(1800, 2000); // <-- this command
如果您想在测试之前将其添加到wdio.conf.js中,则可以将其添加到
/**
* Gets executed before test execution begins. At this point you can access to all global
* variables like `browser`. It is the perfect place to define custom commands.
* @param {Array.<Object>} capabilities list of capabilities details
* @param {Array.<String>} specs List of spec file paths that are to be run
*/
// before: function (capabilities, specs) {
// },