Exemplo n.º 1
0
        public EA_POM Log_Invalids(string user, string pass)
        {
            Url_Logpage = Web_Driver.driver.Url;
            Console.WriteLine(Url_Logpage);
            //User name and Password
            UserName.SendKeys(user);
            Pasword.SendKeys(pass);
            Title_Logpage = Web_Driver.driver.Title;

            Console.WriteLine(Title_Logpage);
            //Clicking on login
            Click.Click();
            UserName.Clear();
            Pasword.Clear();
            Thread.Sleep(3000);
            //Getting text2
            Invalid_Text = Invalid_txt.Text;


            Title_Homepage = Web_Driver.driver.Title;
            Url_Homepage   = Web_Driver.driver.Url;
            Console.WriteLine(Title_Homepage);
            Console.WriteLine(Url_Homepage);
            Asserts.Log_Invalid_Text(Invalid_Text);

            Asserts.Log_Invalid_Assert_Title(Title_Logpage, Title_Homepage);
            Asserts.Log_Invalid_Text(Invalid_Text);
            return(new EA_POM());
        }
Exemplo n.º 2
0
        public EA_POM Log_Valids(string user, string pass)
        {
            Url_Logpage = Web_Driver.driver.Url;
            Console.WriteLine(Url_Logpage);
            //User name and Password
            UserName.SendKeys(user);
            Pasword.SendKeys(pass);
            Title_Logpage = Web_Driver.driver.Title;

            Console.WriteLine(Title_Logpage);
            //Clicking on login
            Click.Click();
            //  Thread.Sleep(3000);
            //Getting text2


            // Thread.Sleep(10000);
            Web_Driver.driver.Navigate();
            Web_Driver.ngWebDriver.WaitForAngular();
            Title_Homepage = Web_Driver.driver.Title;

            Url_Homepage = Web_Driver.driver.Url;
            Console.WriteLine(Title_Homepage);
            Console.WriteLine(Url_Homepage);

            Asserts.valid_Assert_Url(Url_Logpage, Url_Logpage);

            Asserts.Log_valid_Assert_Title(Title_Logpage, Title_Homepage);
            //Getting Log_Text
            Log_Text = Log_Txt.Text;
            Asserts.Assert_Log_Text(Log_Text);
            Text_Heightlight.highlight6(Log_Out_Text);
            //Logging out
            Log_Txt.Click();
            Thread.Sleep(4000);

            Log_Out.Click();
            Asserts.valid_Assert_logout_Url(Url_Homepage, Url_Logpage);
            Console.WriteLine(Log_Text);
            //Loging in for testing other pages
            UserName.SendKeys(user);
            Pasword.SendKeys(pass);
            //Clicking on login
            Click.Click();

            return(new EA_POM());
        }