Esempio n. 1
0
 public abstract void InitPageElements(BROWSER_TARGETS browserTarget);
Esempio n. 2
0
        public BaseTestAllBrowsers(BROWSER_TARGETS target)
        {
            BrowserTarget = target;
            switch (target)
            {
            case BROWSER_TARGETS.FIREFOX:
                BrowserCapabilities = DesiredCapabilities.Firefox();
                break;

            case BROWSER_TARGETS.FIREFOX36:
                BrowserCapabilities = DesiredCapabilities.Firefox();
                BrowserCapabilities.SetCapability(CapabilityType.Version, "3.6");
                break;

            case BROWSER_TARGETS.IE8:
                BrowserCapabilities = DesiredCapabilities.InternetExplorer();
                BrowserCapabilities.SetCapability(CapabilityType.Version, "8");
                break;

            case BROWSER_TARGETS.IE9:
                BrowserCapabilities = DesiredCapabilities.InternetExplorer();
                BrowserCapabilities.SetCapability(CapabilityType.Version, "9");
                break;

            case BROWSER_TARGETS.IE10:
                BrowserCapabilities = DesiredCapabilities.InternetExplorer();
                BrowserCapabilities.SetCapability(CapabilityType.Version, "10");
                break;

            case BROWSER_TARGETS.IE11:
                BrowserCapabilities = DesiredCapabilities.InternetExplorer();
                BrowserCapabilities.SetCapability(CapabilityType.Version, "11");
                break;

            case BROWSER_TARGETS.CHROME:
            {
                ChromeOptions options = new ChromeOptions();
                options.AddExcludedArguments((new string[] { "test-type", "ignore-certificate-errors" }).ToList <string>());
                BrowserCapabilities = (DesiredCapabilities)options.ToCapabilities();
            }
            break;

            case BROWSER_TARGETS.CHROMEINCOGNITO:
            {
                ChromeOptions options = new ChromeOptions();
                options.AddExcludedArguments((new string[] { "test-type", "ignore-certificate-errors" }).ToList <string>());
                options.AddArgument("-incognito");
                BrowserCapabilities = (DesiredCapabilities)options.ToCapabilities();
            }
            break;

            case BROWSER_TARGETS.OPERA:
                BrowserCapabilities = DesiredCapabilities.Opera();
                break;

            case BROWSER_TARGETS.ANDROID:
                BrowserCapabilities = DesiredCapabilities.Android();
                break;

            case BROWSER_TARGETS.IPAD:
                BrowserCapabilities = DesiredCapabilities.IPad();
                break;

            default:
                BrowserCapabilities = new DesiredCapabilities();
                break;
            }

            BrowserCapabilities.IsJavaScriptEnabled = true;
        }
Esempio n. 3
0
 public SmokeTests(BROWSER_TARGETS target)
     : base(target)
 {
 }