Esempio n. 1
0
        public static Size GetWindowSize(MobileWindowSize windowSize)
        {
            Size result = default(Size);

            switch (windowSize)
            {
            case MobileWindowSize._360_640:
                result = new Size(360, 640);
                break;

            case MobileWindowSize._375_667:
                result = new Size(375, 667);
                break;

            case MobileWindowSize._720_1280:
                result = new Size(720, 1280);
                break;

            case MobileWindowSize._320_568:
                result = new Size(320, 568);
                break;

            case MobileWindowSize._414_736:
                result = new Size(414, 736);
                break;

            case MobileWindowSize._320_534:
                result = new Size(320, 534);
                break;
            }

            return(result);
        }
Esempio n. 2
0
 public SauceLabsAttribute(
     BrowserType browser,
     string browserVersion,
     string platform,
     MobileWindowSize mobileWindowSize,
     BrowserBehavior behavior = BrowserBehavior.NotSet,
     bool recordVideo         = false,
     bool recordScreenshots   = false,
     bool shouldAutomaticallyScrollToVisible = true)
     : this(browser, browserVersion, platform, behavior, recordVideo, recordScreenshots, shouldAutomaticallyScrollToVisible)
     => ScreenResolution = WindowsSizeResolver.GetWindowSize(mobileWindowSize).ConvertToString();
Esempio n. 3
0
 public SelenoidAttribute(
     BrowserType browser,
     string browserVersion,
     MobileWindowSize mobileWindowSize,
     BrowserBehavior behavior = BrowserBehavior.NotSet,
     bool recordVideo         = false,
     bool enableVnc           = false,
     bool saveSessionLogs     = false,
     bool shouldAutomaticallyScrollToVisible = true)
     : this(browser, browserVersion, behavior, recordVideo, enableVnc, saveSessionLogs, shouldAutomaticallyScrollToVisible)
     => ScreenResolution = WindowsSizeResolver.GetWindowSize(mobileWindowSize).ConvertToStringWithColorDepth();
Esempio n. 4
0
 public CrossBrowserTestingAttribute(
     BrowserType browser,
     string browserVersion,
     string platform,
     MobileWindowSize mobileWindowSize,
     BrowserBehavior behavior = BrowserBehavior.NotSet,
     bool captureVideo        = false,
     bool captureNetworkLogs  = false,
     string build             = null,
     bool shouldAutomaticallyScrollToVisible = true)
     : this(browser, browserVersion, platform, behavior, captureVideo, captureNetworkLogs, build, shouldAutomaticallyScrollToVisible)
     => ScreenResolution = WindowsSizeResolver.GetWindowSize(mobileWindowSize).ConvertToString();
Esempio n. 5
0
 public BrowserStackAttribute(
     BrowserType browser,
     string browserVersion,
     string operatingSystem,
     string osVersion,
     MobileWindowSize mobileWindowSize,
     Lifecycle behavior      = Lifecycle.NotSet,
     bool captureVideo       = false,
     bool captureNetworkLogs = false,
     BrowserStackConsoleLogType browserStackConsoleLogType = BrowserStackConsoleLogType.Disable,
     bool debug   = false,
     string build = null,
     bool shouldAutomaticallyScrollToVisible = true)
     : this(browser, browserVersion, operatingSystem, osVersion, behavior, captureVideo, captureNetworkLogs, browserStackConsoleLogType, debug, build, shouldAutomaticallyScrollToVisible)
     => ScreenResolution = WindowsSizeResolver.GetWindowSize(mobileWindowSize).ConvertToString();
Esempio n. 6
0
 public BrowserAttribute(BrowserType browser, MobileWindowSize mobileWindowSize, Lifecycle behavior = Lifecycle.NotSet, bool shouldAutomaticallyScrollToVisible = true, bool shouldCaptureHttpTraffic = false)
     : this(browser, behavior, shouldCaptureHttpTraffic)
     => Size = WindowsSizeResolver.GetWindowSize(mobileWindowSize);
Esempio n. 7
0
 public RemoteAttribute(BrowserType browser, string browserVersion, PlatformType platform, MobileWindowSize mobileWindowSize, BrowserBehavior behavior = BrowserBehavior.NotSet, bool shouldAutomaticallyScrollToVisible = true)
     : base(browser, mobileWindowSize, behavior, shouldAutomaticallyScrollToVisible)
 {
     BrowserVersion = browserVersion;
     PlatformType   = platform;
     ExecutionType  = ExecutionType.Grid;
 }
Esempio n. 8
0
 public AppAttribute(string appPath, MobileWindowSize mobileWindowSize, Lifecycle behavior = Lifecycle.NotSet)
     : this(appPath, behavior)
 {
     AppConfiguration.Size = WindowsSizeResolver.GetWindowSize(mobileWindowSize);
 }