SerenityマネージドクロームドライバでNexus 5ビューのモバイルエミュレーションを設定するにはどうすればよいですか?クロムドライバのセレンティプロパティファイルにデバイス名を設定
私は、このリンクを通過しようとした:クロムのプリファレンスを設定する説明 https://johnfergusonsmart.com/configuring-chromedriver-easily-with-serenity-bdd/
を。このことから
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を設定しようとしたが、それらのどれも成功しません。