コード例 #1
0
 public AppAttribute(string appPath, AppBehavior behavior = AppBehavior.NotSet)
 {
     AppConfiguration                     = new AppConfiguration();
     AppConfiguration.AppPath             = appPath;
     AppConfiguration.AppBehavior         = behavior;
     AppConfiguration.Size                = default;
     AppConfiguration.DesiredCapabilities = new DesiredCapabilities();
 }
コード例 #2
0
 public AppConfiguration(string appPath, AppBehavior appBehavior, Size size, string classFullName, DesiredCapabilities appiumOptions = null)
 {
     AppPath             = appPath;
     AppBehavior         = appBehavior;
     Size                = size;
     ClassFullName       = classFullName;
     DesiredCapabilities = appiumOptions;
 }
コード例 #3
0
 public IOSSauceLabsAttribute(
     string appPath,
     string platformVersion,
     string deviceName,
     AppBehavior behavior   = AppBehavior.NotSet,
     bool recordVideo       = false,
     bool recordScreenshots = false)
     : base(appPath, platformVersion, deviceName, behavior, recordVideo, recordScreenshots)
 {
     AppConfiguration.MobileOSType = MobileOSType.IOS;
     AppConfiguration.PlatformName = "iOS";
 }
コード例 #4
0
 protected SauceLabsAttribute(
     string appPath,
     string platformVersion,
     string deviceName,
     AppBehavior behavior   = AppBehavior.NotSet,
     bool recordVideo       = false,
     bool recordScreenshots = false)
     : base(appPath, platformVersion, deviceName, behavior)
 {
     RecordVideo       = recordVideo;
     RecordScreenshots = recordScreenshots;
     AppConfiguration.ExecutionType = ExecutionType.SauceLabs;
 }
コード例 #5
0
 public IOSCrossBrowserTestingAttribute(
     string appPath,
     string platformVersion,
     string deviceName,
     AppBehavior behavior = AppBehavior.NotSet,
     bool recordVideo     = false,
     bool recordNetwork   = false,
     string build         = null)
     : base(appPath, platformVersion, deviceName, behavior, recordVideo, recordNetwork, build)
 {
     AppConfiguration.MobileOSType = MobileOSType.IOS;
     AppConfiguration.PlatformName = "iOS";
 }
コード例 #6
0
        public static void ChangeBehavior(AppBehavior newBehavior)
        {
            if (ActualBehavior == newBehavior)
            {
                return;
            }

            if (ActualBehavior != null)
            {
                ActualBehavior.Detach();
            }

            ActualBehavior = newBehavior;
            ActualBehavior.Attach();
        }
コード例 #7
0
    public static void ChangeBehavior(AppBehavior newBehavior)
    {
      if (ActualBehavior == newBehavior)
      {
        return;
      }

      if (ActualBehavior != null)
      {
        ActualBehavior.Detach();
      }

      ActualBehavior = newBehavior;
      ActualBehavior.Attach();
    }
コード例 #8
0
 public IOSBrowserStackAttribute(
     string appPath,
     string platformVersion,
     string deviceName,
     AppBehavior behavior = AppBehavior.NotSet,
     bool captureVideo = false,
     bool captureNetworkLogs = false,
     BrowserStackConsoleLogType consoleLogType = BrowserStackConsoleLogType.Disable,
     bool debug = false,
     string build = null)
     : base(appPath, platformVersion, deviceName, behavior, captureVideo, captureNetworkLogs, consoleLogType, debug, build)
 {
     AppConfiguration.MobileOSType = MobileOSType.IOS;
     AppConfiguration.PlatformName = "iOS";
 }
コード例 #9
0
 protected CrossBrowserTestingAttribute(
     string appPath,
     string platformVersion,
     string deviceName,
     AppBehavior behavior = AppBehavior.NotSet,
     bool recordVideo     = false,
     bool recordNetwork   = false,
     string build         = null)
     : base(appPath, platformVersion, deviceName, behavior)
 {
     Build         = build;
     RecordVideo   = recordVideo;
     RecordNetwork = recordNetwork;
     AppConfiguration.ExecutionType = ExecutionType.BrowserStack;
 }
コード例 #10
0
 public AndroidSauceLabsAttribute(
     string appPath,
     string platformVersion,
     string deviceName,
     string appPackage,
     string appActivity,
     AppBehavior behavior   = AppBehavior.NotSet,
     bool recordVideo       = false,
     bool recordScreenshots = false)
     : base(appPath, platformVersion, deviceName, behavior, recordVideo, recordScreenshots)
 {
     AppConfiguration.MobileOSType = MobileOSType.Android;
     AppConfiguration.PlatformName = "Android";
     AppConfiguration.AppPackage   = appPackage;
     AppConfiguration.AppActivity  = appActivity;
 }
コード例 #11
0
 public AndroidCrossBrowserTestingAttribute(
     string appPath,
     string platformVersion,
     string deviceName,
     string appPackage,
     string appActivity,
     AppBehavior behavior = AppBehavior.NotSet,
     bool recordVideo     = false,
     bool recordNetwork   = false,
     string build         = null)
     : base(appPath, platformVersion, deviceName, behavior, recordVideo, recordNetwork, build)
 {
     AppConfiguration.MobileOSType = MobileOSType.Android;
     AppConfiguration.PlatformName = "Android";
     AppConfiguration.AppPackage   = appPackage;
     AppConfiguration.AppActivity  = appActivity;
 }
コード例 #12
0
 protected BrowserStackAttribute(
     string appPath,
     string platformVersion,
     string deviceName,
     AppBehavior behavior    = AppBehavior.NotSet,
     bool captureVideo       = false,
     bool captureNetworkLogs = false,
     BrowserStackConsoleLogType consoleLogType = BrowserStackConsoleLogType.Disable,
     bool debug   = false,
     string build = null)
     : base(appPath, platformVersion, deviceName, behavior)
 {
     Debug                          = debug;
     Build                          = build;
     CaptureVideo                   = captureVideo;
     CaptureNetworkLogs             = captureNetworkLogs;
     ConsoleLogType                 = consoleLogType;
     AppConfiguration.ExecutionType = ExecutionType.BrowserStack;
 }
コード例 #13
0
 public AndroidBrowserStackAttribute(
     string appPath,
     string platformVersion,
     string deviceName,
     string appPackage,
     string appActivity,
     AppBehavior behavior    = AppBehavior.NotSet,
     bool captureVideo       = false,
     bool captureNetworkLogs = false,
     BrowserStackConsoleLogType consoleLogType = BrowserStackConsoleLogType.Disable,
     bool debug   = false,
     string build = null)
     : base(appPath, platformVersion, deviceName, behavior, captureVideo, captureNetworkLogs, consoleLogType, debug, build)
 {
     AppConfiguration.MobileOSType = MobileOSType.Android;
     AppConfiguration.PlatformName = "Android";
     AppConfiguration.AppPackage   = appPackage;
     AppConfiguration.AppActivity  = appActivity;
 }
コード例 #14
0
 public IOSAttribute(OS osPlatform, string appPath, string platformVersion, string deviceName, AppBehavior behavior = AppBehavior.NotSet)
     : base(osPlatform, appPath, platformVersion, deviceName, behavior)
     => AppConfiguration.MobileOSType = MobileOSType.IOS;
コード例 #15
0
 public IOSWebAttribute(OS osPlatform, string appPath, string platformVersion, string deviceName, AppBehavior behavior = AppBehavior.NotSet)
     : base(osPlatform, appPath, platformVersion, deviceName, behavior)
 {
     AppConfiguration.OSPlatform   = OS.OSX;
     AppConfiguration.MobileOSType = MobileOSType.IOS;
     AppConfiguration.PlatformName = "iOS";
     AppConfiguration.BrowserName  = "Safari";
 }
コード例 #16
0
 public AndroidAttribute(OS osPlatform, string appPath, string platformVersion, string deviceName, string appPackage, string appActivity, AppBehavior behavior = AppBehavior.NotSet)
     : base(osPlatform, appPath, platformVersion, deviceName, behavior)
 {
     AppConfiguration.MobileOSType = MobileOSType.Android;
     AppConfiguration.PlatformName = "Android";
     AppConfiguration.AppPackage   = appPackage;
     AppConfiguration.AppActivity  = appActivity;
 }
コード例 #17
0
 public AndroidWebAttribute(OS osPlatform, string appPath, string platformVersion, string deviceName, AppBehavior behavior = AppBehavior.NotSet)
     : base(osPlatform, appPath, platformVersion, deviceName, behavior)
 {
     AppConfiguration.MobileOSType = MobileOSType.Android;
     AppConfiguration.PlatformName = "Android";
     AppConfiguration.BrowserName  = "Chrome";
 }
コード例 #18
0
 protected AppAttribute(string appPath, string platformVersion, string deviceName, AppBehavior behavior = AppBehavior.NotSet)
 => AppConfiguration = new AppConfiguration
コード例 #19
0
 public AppAttribute(string appPath, DesktopWindowSize desktopWindowSize, AppBehavior behavior = AppBehavior.NotSet)
     : this(appPath, behavior)
 {
     AppConfiguration.Size = WindowsSizeResolver.GetWindowSize(desktopWindowSize);
 }
コード例 #20
0
 public AppAttribute(string appPath, int width, int height, AppBehavior behavior = AppBehavior.NotSet)
     : this(appPath, behavior)
 {
     AppConfiguration.Size = new Size(width, height);
 }
コード例 #21
0
 public static void Initialize()
 {
   ActualBehavior = new DefaultAppBehavior();
   ActualBehavior.Attach();
 }
コード例 #22
0
 public IOSAttribute(string appPath, string platformVersion, string deviceName, AppBehavior behavior = AppBehavior.NotSet)
     : base(appPath, platformVersion, deviceName, behavior)
 {
     AppConfiguration.OSPlatform   = OS.OSX;
     AppConfiguration.MobileOSType = MobileOSType.IOS;
 }
コード例 #23
0
 public static void Initialize()
 {
     ActualBehavior = new DefaultAppBehavior();
     ActualBehavior.Attach();
 }