Nightwatch.js在chrome中启动测试,并在chrome开发工具中切换了移动模式

问题描述 投票:0回答:1

如何在移动模式切换的情况下在chrome中开始测试?我的意思不是这个设置:

       chromeOptions: {
          // args: ['headless', 'no-sandbox', 'disable-gpu', 'touch-events'],
          mobileEmulation: {
            deviceMetrics: { width: 360, height: 640, pixelRatio: 3 },
            userAgent:
          'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Mobile Safari/537.36 profi-autotest',
          },
        },

因为上述设置仅将视口调整为移动设备的大小,但不会在chrome开发工具中的设备工具栏中切换实际的“移动模式”

vue.js mobile e2e-testing nightwatch.js
1个回答
0
投票
https://github.com/nightwatchjs/nightwatch/issues/2248

发现这对遇到相同问题的任何人(浏览器堆栈,现在都可以尝试一下。

© www.soinside.com 2019 - 2024. All rights reserved.