示例#1
0
 public void CheckAnswers()
 {
     using (var driver = new ChromeDriver())
     {
         driver.Navigate().GoToUrl(ULearnUrls.StartPage);
         UlearnDriver ulearnDriver = new UlearnDriver(driver);
         ulearnDriver.GoToRegistrationPage();
         var registrationPage = ulearnDriver.Get <RegistrationPage>();
         ulearnDriver.LoginAdminAndGoToCourse(Titles.BasicProgrammingTitle);
         //var first
         var page = ulearnDriver.Get <SlidePage>();
     }
 }
示例#2
0
		public void CheckAnswers()
		{
			using (var driver = new ChromeDriver())
			{
				driver.Navigate().GoToUrl(ULearnUrls.StartPage);
				UlearnDriver ulearnDriver = new UlearnDriver(driver);
				ulearnDriver.GoToRegistrationPage();
				var registrationPage = ulearnDriver.Get<RegistrationPage>();
				ulearnDriver.LoginAdminAndGoToCourse(Titles.BasicProgrammingTitle);
				//var first
				var page = ulearnDriver.Get<SlidePage>();
			}
		}
示例#3
0
		public void GetStartPage()
		{
			using (var driver = new ChromeDriver())
			{
				driver.Navigate().GoToUrl(ULearnUrls.StartPage);
				var ulearnDriver = new UlearnDriver(driver);
				var startPage = ulearnDriver.Get<StartPage>();
				Assert.AreEqual(PageType.StartPage, ulearnDriver.GetCurrentPageType());
			}
		}
示例#4
0
 public void GetStartPage()
 {
     using (var driver = new ChromeDriver())
     {
         driver.Navigate().GoToUrl(ULearnUrls.StartPage);
         var ulearnDriver = new UlearnDriver(driver);
         var startPage    = ulearnDriver.Get <StartPage>();
         Assert.AreEqual(PageType.StartPage, ulearnDriver.GetCurrentPageType());
     }
 }
示例#5
0
		public void LoginVk()
		{
			using (var driver = new ChromeDriver())
			{
				driver.Navigate().GoToUrl(ULearnUrls.StartPage);
				var ulearnDriver = new UlearnDriver(driver);
				var startPage = ulearnDriver.Get<StartPage>();
				var signInPage = startPage.GoToSignInPage();
				signInPage.LoginVk();
				Assert.AreEqual(Admin.Login, ulearnDriver.GetCurrentUserName());
			}
		}
示例#6
0
 public void LoginVk()
 {
     using (var driver = new ChromeDriver())
     {
         driver.Navigate().GoToUrl(ULearnUrls.StartPage);
         var ulearnDriver = new UlearnDriver(driver);
         var startPage    = ulearnDriver.Get <StartPage>();
         var signInPage   = startPage.GoToSignInPage();
         signInPage.LoginVk();
         Assert.AreEqual(Admin.Login, ulearnDriver.GetCurrentUserName());
     }
 }
示例#7
0
		public void NotBeLoggedIn()
		{
			using (var driver = new ChromeDriver())
			{
				driver.Navigate().GoToUrl(ULearnUrls.StartPage);
				UlearnDriver ulearnDriver = new UlearnDriver(driver);
				var startPage = ulearnDriver.Get<StartPage>();

				startPage.GoToSignInPage();

				ulearnDriver.GoToStartPage();
				var isLogin = ulearnDriver.LoggedIn;
				Assert.IsFalse(isLogin);
			}
		}
示例#8
0
        public void NotBeLoggedIn()
        {
            using (var driver = new ChromeDriver())
            {
                driver.Navigate().GoToUrl(ULearnUrls.StartPage);
                UlearnDriver ulearnDriver = new UlearnDriver(driver);
                var          startPage    = ulearnDriver.Get <StartPage>();

                startPage.GoToSignInPage();

                ulearnDriver.GoToStartPage();
                var isLogin = ulearnDriver.LoggedIn;
                Assert.IsFalse(isLogin);
            }
        }
示例#9
0
		public void GoToSignInPage()
		{
			using (IWebDriver driver = new ChromeDriver())
			{
				driver.Navigate().GoToUrl(ULearnUrls.StartPage);
				UlearnDriver ulearnDriver = new UlearnDriver(driver);
				var startPage = ulearnDriver.Get<StartPage>();

				startPage.GoToSignInPage();
				Assert.AreEqual(PageType.SignInPage, ulearnDriver.GetCurrentPageType());

				ulearnDriver.GoToStartPage();
				var isLogin = ulearnDriver.LoggedIn;
				Assert.IsFalse(isLogin);
			}
		}
示例#10
0
        public void GoToSignInPage()
        {
            using (IWebDriver driver = new ChromeDriver())
            {
                driver.Navigate().GoToUrl(ULearnUrls.StartPage);
                UlearnDriver ulearnDriver = new UlearnDriver(driver);
                var          startPage    = ulearnDriver.Get <StartPage>();

                startPage.GoToSignInPage();
                Assert.AreEqual(PageType.SignInPage, ulearnDriver.GetCurrentPageType());

                ulearnDriver.GoToStartPage();
                var isLogin = ulearnDriver.LoggedIn;
                Assert.IsFalse(isLogin);
            }
        }