use of com.ruiyun.jvppeteer.options.Viewport in project epic4j by huisunan.
the class MainStart method getDefaultPage.
@Override
@Retry(message = "默认页面打开失败")
public Page getDefaultPage(Browser browser) {
List<Page> pages = browser.pages();
Page page = CollUtil.isNotEmpty(pages) ? pages.get(0) : browser.newPage();
Viewport viewport = new Viewport();
viewport.setWidth(600);
viewport.setHeight(1000);
viewport.setHasTouch(true);
page.setViewport(viewport);
return page;
}