public virtual IApp StartApp(Platform platform, RunnerConfiguration runnerConfiguration)
        {
            if (platform == Platform.Android)
            {
                return(ConfigureApp
                       .Android
                       .ApkFile(runnerConfiguration.AndroidConfiguration.AppPath)
                       .EnableLocalScreenshots()
                       .StartApp());
            }

            if (runnerConfiguration.IosConfiguration.Simulator)
            {
                return(ConfigureApp
                       .iOS
                       .DeviceIdentifier(runnerConfiguration.IosConfiguration.SimulatorIdentifier)
                       .AppBundle(runnerConfiguration.IosConfiguration.AppPath)
                       .EnableLocalScreenshots()
                       .StartApp());
            }

            var iosDeviceIdentifier = runnerConfiguration.IosConfiguration.DeviceIdentifier;
            var iosBundleName       = runnerConfiguration.IosConfiguration.BundleName;

            return(ConfigureApp
                   .iOS
                   .DeviceIdentifier(iosDeviceIdentifier)
                   .InstalledApp(iosBundleName)
                   .PreferIdeSettings()
                   .EnableLocalScreenshots()
                   .StartApp());
        }
        public static RunnerConfiguration GetInstance()
        {
            if (Current != null)
            {
                return(Current);
            }

            if (CurrentAssembly == null)
            {
                return(null);
            }

            var resourceFile = Helpers.FormatResourceName(CurrentAssembly, ConfigurationFile);

            using (var stream = CurrentAssembly.GetManifestResourceStream(resourceFile))
            {
                if (stream == null)
                {
                    return(null);
                }

                var reader   = new StreamReader(stream);
                var jsonFile = reader.ReadToEnd();
                Current = new RunnerConfiguration(jsonFile);
            }

            return(Current);
        }