Exemplo n.º 1
0
        public void LoginViaApi(User user)
        {
            var token = new Token(Driver.Manage().Cookies.GetCookieNamed("PHPSESSID").Value);

            LoginApi.Login(user, token);
            MyDriver.SetCookies(Driver);
            Driver.Url = "https://s2.demo.opensourcecms.com/orangehrm/index.php";
        }
Exemplo n.º 2
0
        public void Login2(User user)
        {
            var token = LoginApi.Login(user);

            Driver.Manage().Cookies.AddCookie(new Cookie("PHPSESSID", token.PHPSESSID));
            Driver.Manage().Cookies.AddCookie(new Cookie("Loggedin", "True"));
            Driver.Url = "https://s2.demo.opensourcecms.com/orangehrm/index.php";
            MyDriver.WriteAllCookies(Driver);
        }
Exemplo n.º 3
0
        public void t2()
        {
            var driver = MyDriver.InitDriver(Browser.Chrome);

            driver.Url = "https://claim.skycop.com/";
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);

            var depaturElement = driver.FindElement(By.CssSelector("#airport-departure input"));

            // depaturElement.Click();
            depaturElement.SendKeys("Vilnius");
            driver.FindElement(By.CssSelector(".Select-option.is-focused")).Click();
        }
Exemplo n.º 4
0
 public void InitDriver()
 {
     Driver     = MyDriver.InitDriver(Browser.Chrome);
     Driver.Url = "https://s2.demo.opensourcecms.com/orangehrm/symfony/web/index.php/auth/login";
     InitPages();
 }
Exemplo n.º 5
0
 public void TestLogout()
 {
     MyDriver.WriteAllCookies(Driver);
     homePage.ClickLogout().AssertLoginButtonIsVisisble();
 }