예제 #1
0
        public void FirstTest()
        {
            // Logga in
            _web.Write(LoginPage.UserNameTextBox(), Definitions.User);
            _web.Write(LoginPage.PasswordTextBox(), Definitions.Password, performPostWriteCheck: false);
            _web.Click(LoginPage.LoggaInButton());

            // Gå till Sammanställning->Plantbalans
            _web.Click(StartPage.SammastallningDropDown());
            _web.Click(StartPage.PlantbalansSelection());

            // Verifiera innehåll
            _web.Verify().CurrentUrl("https://skogsvardtestintern.sveaskog.se/Plantbalans.aspx");
            _web.Verify(PlantbalansPage.PlantbalansHeader()).Exists();
        }
예제 #2
0
        public void ClaremontSe()
        {
            var searchIcon = new DomElement(By
                                            .TagName("button")
                                            .AndByClass("icon"));

            var inputBox = new DomElement(By
                                          .TagName("input")
                                          .AndByAttributeValue("type", "text"));

            var inputBoxXPath = new DomElement(By
                                               .XPath("//input[@type='text']"));

            var testFestLink = new DomElement(By
                                              .TagName("a")
                                              .AndByAttributeValue("href", "/event/event-testfest-1218/"));

            _web.Navigate("http://www.claremont.se");
            _web.Verify().CurrentUrl("https://www.claremont.se/");
            _web.Click(searchIcon);
            _web.Write(inputBoxXPath, "Test");
            _web.Type(inputBox, Keys.Enter);
            _web.Verify(testFestLink).Text("TestFest");
        }