angular-fullstack/generator-angular-fullstack

Protractor ChromeDriver configuration for mobile emulation

開放

#728 建立於 2014年12月2日

 (13 則留言) (4 個反應) (0 位負責人)JavaScript (1,268 個分叉)batch import
Help Wantedenhancement

倉庫指標

星標
 (6,134 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

We're working on end to end testing with protractor. We need to test our website on a variety of mobile devices so we would like to use ChromeDriver Emulation

The docs on the site are really thin, can anyone point me in the correct direction to get the setup complete? Here is what I have so far:

Updated chromedriver to 2.9.248307 (chromedriver 2.11 appears to be the first version with mobile emulation but 2.10 was the default in the generator.

In protractor.conf.js have set chromeOnly: true

Device capabilities are shown below. It doesn't seem to matter what I provide, it runs chromedriver but it appears to ignore the capabilities set in protractor.conf.js:

{
  "browserName": "chrome",
  "device": "Apple iPhone 6",
  "deviceMetrics": {
    "width": 360,
    "height": 640,
    "pixelRatio": 3.0
  }
}

What else needs to be configured/provided?

貢獻者指南