Пример #1
0
        public void SetupForEverySingleTestMethod()
        {
            //Driver = new WebDriverFactory().CreateSauceDriver();
            SampleAppPage = new SampleApplicationPage(Driver);

            TheTestUser           = new TestUser();
            TheTestUser.FirstName = "Nikolay";
            TheTestUser.LastName  = "BLahzah";

            EmergencyContactUser           = new TestUser();
            EmergencyContactUser.FirstName = "Emergency First Name";
            EmergencyContactUser.LastName  = "Emergency Last Name";
        }
Пример #2
0
        public void QuizExercise2()
        {
            //2. chrome 48 on Linux
            var caps = new DesiredCapabilities();

            caps.SetCapability("browserName", "Chrome");
            caps.SetCapability("platform", "Linux");
            caps.SetCapability("version", "48.0");
            caps.SetCapability("username",
                               Environment.GetEnvironmentVariable("SAUCE_USERNAME", EnvironmentVariableTarget.User));
            caps.SetCapability("accessKey",
                               Environment.GetEnvironmentVariable("SAUCE_ACCESS_KEY", EnvironmentVariableTarget.User));
            Driver = new RemoteWebDriver(new Uri("http://ondemand.saucelabs.com:80/wd/hub"),
                                         caps, TimeSpan.FromSeconds(600));

            SampleAppPage = new SampleApplicationPage(Driver);
            SampleAppPage.GoTo();
            SampleAppPage.FillOutEmergencyContactForm(EmergencyContactUser);
            var ultimateQAHomePage = SampleAppPage.FillOutPrimaryContactFormAndSubmit(TheTestUser);

            AssertPageVisibleVariation2(ultimateQAHomePage);
        }
Пример #3
0
        public void SetupForEverySingleTestMethod()
        {
            var sauceConfig = new SauceConfiguration
            {
                Browser           = Browser,
                Version           = Version,
                OS                = OS,
                DeviceName        = DeviceName,
                DeviceOrientation = DeviceOrientation,
                TestCaseName      = TestContext.CurrentContext.Test.FullName
            };

            Driver        = new WebDriverFactory().CreateSauceDriver(sauceConfig);
            SampleAppPage = new SampleApplicationPage(Driver);

            TheTestUser           = new TestUser();
            TheTestUser.FirstName = "Nikolay";
            TheTestUser.LastName  = "BLahzah";

            EmergencyContactUser           = new TestUser();
            EmergencyContactUser.FirstName = "Emergency First Name";
            EmergencyContactUser.LastName  = "Emergency Last Name";
        }