public static string GetText()
        {
            HomePageElements elements = new HomePageElements();

            elements.alertMessage.Text.ToString();
            return(elements.alertMessage.Text);
        }
        public static void FillingLogInForm(string username, string password)
        {
            HomePageElements elements = new HomePageElements();

            elements.email.SendKeys(username);
            elements.password.SendKeys(password);
            Driver.Wait();
        }
Beispiel #3
0
        public static void InvalidPassword()
        {
            HomePageElements elements = new HomePageElements();

            elements.prijaviSe.Click();
            elements.email.SendKeys(Configuration.Credentials.ValidCredentials.Username);
            elements.password.SendKeys(Configuration.Credentials.InvalidCredentials.Password);
            elements.logInButton.Click();
            Driver.Wait();
        }
        public static void LogOut(IWebDriver driver)
        {
            HomePageElements elements = new HomePageElements();

            Actions action = new Actions(driver);

            //action.MoveToElement(driver.FindElement(By.XPath("/html/body/header/div[1]/nav/div[@class='flex items-center']/div[1]/a[@href='/moj-kutak']/span[.='Moj nalog']")))
            // .Build().Perform();

            action.MoveToElement(elements.logOutIcon).MoveToElement(elements.logOut).Click().Build().Perform();
            //elements.logOut.Click();
        }