Ejemplo n.º 1
0
        /// <summary>
        /// Get the mobile options
        /// </summary>
        /// <param name="capabilities">The mobile driver capabilities</param>
        /// <returns>The mobile options</returns>
        public static AppiumOptions GetDefaultMobileOptions(Dictionary <string, object> capabilities)
        {
            AppiumOptions options = new AppiumOptions();

            options.SetMobileOptions(capabilities);

            return(options);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get the mobile options
        /// </summary>
        /// <returns>The mobile options</returns>
        public static AppiumOptions GetDefaultMobileOptions()
        {
            AppiumOptions options = new AppiumOptions();

            options.AddAdditionalCapability(MobileCapabilityType.DeviceName, AppiumConfig.GetDeviceName());
            options.AddAdditionalCapability(MobileCapabilityType.PlatformVersion, AppiumConfig.GetPlatformVersion());
            options.AddAdditionalCapability(MobileCapabilityType.PlatformName, AppiumConfig.GetPlatformName().ToUpper());
            options.SetMobileOptions(AppiumConfig.GetCapabilitiesAsObjects());

            return(options);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Get the mobile options
        /// </summary>
        /// <returns>The mobile options</returns>
        public static AppiumOptions GetDefaultMobileOptions()
        {
            AppiumOptions options = new AppiumOptions();

            options.App             = AppiumConfig.GetApp();
            options.BrowserName     = AppiumConfig.GetBrowserName();
            options.BrowserVersion  = AppiumConfig.GetBrowserVersion();
            options.DeviceName      = AppiumConfig.GetDeviceName();
            options.PlatformVersion = AppiumConfig.GetPlatformVersion();
            options.PlatformName    = AppiumConfig.GetPlatformName().ToUpper();
            options.SetMobileOptions(AppiumConfig.GetCapabilitiesAsObjects());

            return(options);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Sets capabilities for testing the iOS Driver creation
        /// </summary>
        /// <returns>iOS instance of the Appium Driver</returns>
        protected override AppiumDriver GetMobileDevice()
        {
            AppiumOptions options = new AppiumOptions
            {
                DeviceName      = "iPhone 13 Simulator",
                PlatformName    = "iOS",
                PlatformVersion = "15.0",
                BrowserName     = "Safari"
            };

            var sauceOptions = AppiumConfig.GetCapabilitiesAsObjects();

            // Use Appium 1.22 for running iOS tests
            (sauceOptions["sauce:options"] as Dictionary <string, object>)["appiumVersion"] = "1.22.0";
            options.SetMobileOptions(sauceOptions);

            return(AppiumDriverFactory.GetIOSDriver(AppiumConfig.GetMobileHubUrl(), options, AppiumConfig.GetMobileCommandTimeout()));
        }