Как разрешить загрузку Flash с webdriver

Привет!
Кто сталкивался, подскажите, что нужно сделать, чтобы загрузить Flash игры с Chrome driver как минимум. (Это может быть не обязательно игра, а что нибудь связное с Flash)
Какие нужны настройки? При обычных не позволяет.
Спасибо!

Пробуйте

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);
prefs.put("PluginsAllowedForUrls", "https://your_url.com");

А что дальше вы собираетесь делать с этими загруженными флеш компонентами?

Спасибо! Нашел решениe, добавил user data c профиля в котором включил flash
options.AddArgument(@“user-data-dir=path”); Но этот способ тоже попробую.

Сравниваю картинки с эталонной, нужно подтвердить факт загрузки

1 лайк

Рабочее решение под C#
ChromeOptions options = new ChromeOptions();
options.AddUserProfilePreference(“profile.default_content_setting_values.plugins”, 1);
options.AddUserProfilePreference(“profile.content_settings.plugin_whitelist.adobe-flash-player”, 1);
options.AddUserProfilePreference(“profile.content_settings.exceptions.plugins.,.per_resource.adobe-flash-player”, 1);
options.AddUserProfilePreference(“PluginsAllowedForUrls”, “http:/");
options.AddUserProfilePreference(“PluginsAllowedForUrls”, "https://
”);
options.AddArgument("–disable-notifications");
options.AddArgument("–disable-extensions");
options.AddArgument("–disable-infobars");
options.AddArgument("–disable-popup-blocking");
options.AddArgument("–allow-running-insecure-content");
options.AddArgument("–allow-insecure-websocket-from-https-origin");
options.AddArgument("–allow-outdated-plugins");

1 лайк