Serenity 관리 크롬 드라이버에서 Nexus 5보기 용 모바일 에뮬레이션을 설정하려면 어떻게해야합니까? 크롬 설정을 기본 설정을 설명 https://johnfergusonsmart.com/configuring-chromedriver-easily-with-serenity-bdd/크롬 드라이버 용 serenity.properties 파일에 장치 이름 설정
을 :
나는이 링크를 통과했습니다. 이에서Chrome preferences
You can also provide more advanced options using the setExperimentalOption() method:
Map<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("download.default_directory", downLoadDirectory);
chromePrefs.put("profile.default_content_settings.popups", 0);
chromePrefs.put("pdfjs.disabled", true);
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", chromePrefs);
In Serenity, you would pass these using properties prefixed with the chrome_preferences prefix, e.g.
chrome_preferences.download.default_directory = /my/download/directory
chrome_preferences.profile_default_content_settings.popups = 0
chrome_preferences.pdfjs.disabled=true
, 나는
chrome.capabilities.mobile_emulation.device_name= Google Nexus 5
chrome.options.mobileEmulation.deviceName= Google Nexus 5
과 다른 몇 가지 논리적 변종으로 mobileEmulation를 설정했지만, 그들 중 누구도 성공하지 않습니다.