How can I maximize the browser window while running test scripts in casperjs using slimerjs

后端 未结 2 767
予麋鹿
予麋鹿 2021-01-04 20:59

I\'m unable to view the full window while running test scripts in casperjs using slimerjs engine . could any one please help me to increase the mozila browser window size

2条回答
  •  一生所求
    2021-01-04 21:45

    var page = require('webpage').create();
    page.open("http://slimerjs.org", function (status) {
        page.viewportSize = { width:1024, height:768 };
        page.render('screenshot.png')
    });
    

    viewportSize allows you to set the window size.

提交回复
热议问题