Beispiel #1
0
        private static FirefoxProfile CreateProfile(DriverProfileJsonSection section)
        {
            string profileDirectory = string.IsNullOrWhiteSpace(section.ProfileDirectory)
                ? null
                : section.ProfileDirectory;

            return(new FirefoxProfile(profileDirectory, section.DeleteSourceOnClean ?? false));
        }
Beispiel #2
0
        private void MapProfile(DriverProfileJsonSection section, FirefoxProfile profile)
        {
            ObjectMapper.Map(section.ExtraPropertiesMap, profile);

            if (section.Extensions != null)
            {
                foreach (var item in section.Extensions)
                {
                    profile.AddExtension(item);
                }
            }

            if (section.Preferences != null)
            {
                foreach (var item in section.Preferences.ExtraPropertiesMap)
                {
                    SetProfilePreference(item.Key, item.Value, profile);
                }
            }
        }