是否可以 运行 chrome 在移动仿真模式下使用带有 InternJS 的 Selenium Server

Is it possible to run chrome in mobile emulation mode with Selenium Server with InternJS

我正在尝试 运行 使用本地 Selenium 服务器实习 JS 功能测试用例。 我正在尝试 运行 在移动仿真模式下使用 chrome 的测试用例。但是,我无法找出正确的配置。

我试过使用这个环境。

environments: [ { browserName: 'chrome'} , 'mobileEmulation': { "deviceName": "Google Nexus 5", "deviceMetrics": {'width': 360, 'height': 640, 'pixelRatio': 3}} } ],

另外,我试过了 capabilities: { 'selenium-version': '2.53.1', 'idle-timeout': 30, "screen-resolution": "360x640" }

capabilities: { 'selenium-version': '2.53.1', 'idle-timeout': 30, 'mobileEmulationEnabled': true }

这可能吗?

尝试使用 capabilities.chromeOptions.mobileEmulation 中定义的移动设置:

environments: [
  { browserName: 'chrome'},
],

capabilities: {
  chromeOptions: {
    mobileEmulation: { 
      deviceName: "Google Nexus 5",
      deviceMetrics: {
          width: 360, 
          height: 640, 
          pixelRatio: 3
      }
    }
  }
},