chrome webdriver에서 사용되는 chrome options 설정목록 문서를 어디서 찾을 수 있을까요?
조회수 1750회
안녕하세요.
질문 : chrome options에서 사용하는 arguments lists 문서를 찾고 싶습니다.
환경 : beautifulsoup4, selenium, chrome webdriver를 사용해서 flash가 적용된 사이트를 크롤링해보고 있습니다.
제한사항 : 하지만 chrome에서 flash를 사용하려면 설정이 필요한데, chrome webdriver를 실행할 대 chrome_options를 설정해주더라구요. 이때 필요한 정보는 stack overflow에서 찾아서 그대로 적용했습니다.
이런식으로 설정이 있었습니다.
ChromeOptions options = new ChromeOptions();
Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("profile.default_content_setting_values.plugins", 1);
prefs.put("profile.content_settings.plugin_whitelist.adobe-flash-player", 1);
prefs.put("profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player", 1);
// Enable Flash for this site
prefs.put("PluginsAllowedForUrls", "https://arlo.netgear.com");
options.setExperimentalOption("prefs", prefs);
제가 참고한 글의 링크입니다.
질문이유 : 이런 설정목록이 chromium doc, selenium doc에 없더라구요. 공식문서에 있어야 근거도 되고, 변경시에 찾아서 확인할 텐데 찾지 못해서 속앓이 중입니다ㅠㅠ
비슷한 내용이 질문된 Selenium.Chrome where can I find a list of all available ChromeOption arguments? C# 의 내용에 적혀있는 pref_names.cc 소스코드가 가장 근접한 답인데
위에서 사용된 설정인
- profile.default_content_setting_values.plugins
- profile.content_settings.plugin_whitelist.adobe-flash-player
- profile.content_settings.exceptions.plugins.,.per_resource.adobe-flash-player
항목들은 없어서 답답합니다.
찾는 방법이나 접근방법, 키워드를 알려 주실수 있으면 감사하겠습니다.
댓글 입력