コード例 #1
0
        public void Exercise_Select_Multi_Two_Test()
        {
            // TODO: Add your test code here
            var internetPage = new InternetPage(this.DriverContext);

            internetPage.GoToPageNew(ProjectBaseConfiguration.NewPage);
            this.DriverContext.WindowMaximize();
            var selectPage = new SelectPage(this.DriverContext);

            selectPage.SelectMulti("Florida", "Texas");
            Verify.That(
                this.DriverContext,
                () => Assert.AreEqual("This would be your first example on select dropd down list to with Selenium.", selectPage.GetHeader()),
                () => Assert.AreEqual("Options selected are : Florida,Texas", selectPage.GetTextSelected("getall-selected")));
        }
コード例 #2
0
        public void Exercise_Select_Single_Test()
        {
            // TODO: Add your test code here
            var internetPage = new InternetPage(this.DriverContext);

            internetPage.GoToPageNew(ProjectBaseConfiguration.NewPage);
            this.DriverContext.WindowMaximize();
            var selectPage = new SelectPage(this.DriverContext);

            selectPage.SelectSingle("Friday");
            Verify.That(
                this.DriverContext,
                () => Assert.AreEqual("This would be your first example on select dropd down list to with Selenium.", selectPage.GetHeader()),
                () => Assert.AreEqual("Day selected :- Friday", selectPage.GetTextSelected("selected-value")));
        }