2016-08-04 9 views
1

로컬 Selenium 서버를 사용하여 Intern JS 기능 테스트 케이스를 실행하려고합니다. 모바일 에뮬레이트 모드에서 크롬으로 테스트 케이스를 실행하려고합니다. 그러나 올바른 구성을 파악할 수는 없습니다.InternJS가 포함 된 Selenium Server에서 모바일 에뮬레이션 모드로 크롬을 실행할 수 있습니까?

이 환경을 사용해 보았습니다.

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 }

이 가능하다조차를 시도?

답변

2

capabilities.chromeOptions.mobileEmulation에 정의 된 모바일 설정을 시도해보십시오

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

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

의미가 있습니다! 그러나 deviceName 또는 deviceMetrics를 독립적으로 사용해야합니다. '알 수없는 오류 : 'deviceName'을 (를) 혼자서 사용해야합니다 .' –