2017-07-17 41 views
0

四處錯誤:量角器 - >瀏覽器選項錯誤

E/launcher - unknown error: cannot parse capability: chromeOptions 
from unknown error: cannot parse mobileEmulation 
from unknown error: 'Google Nexus 5' must be a valid device 
from unknown error: must be a valid device 
    (Driver info: chromedriver=2.30.477700 

量角器配置:

capabilities: { 
    'browserName': 'chrome', 
    'chromeOptions': { 
       'mobileEmulation': { 
        'deviceName': 'Google Nexus 5' 
       } 
      } 
}, 

任何想法,爲什麼?

回答

0

我認爲該設備名稱必須正好等於支持的設備,在這種情況下,僅指定Nexus 5

capabilities: { 
    'browserName': 'chrome', 
    'chromeOptions': { 
     'mobileEmulation': { 
      'deviceName': 'Nexus 5' 
     } 
    } 
}, 
+0

謝謝!這工作。 https://github.com/angular-fullstack/generator-angular-fullstack/issues/728。量角器文章真的與我混爲一談 – selvatp