public void LoginToFlipkart_Step(String UserName, String Password) { Console.WriteLine("Login to Flipkart Application"); if (sTxt_Username.Displayed == true) { driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(3); sTxt_Username.SendKeys(UserName); Txt_Password.SendKeys(Password); Btn_LogIn.Click(); } else { Lnk_LogIn.Click(); Thread.Sleep(3000); Console.WriteLine("Login to Flipkart Application"); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(3); sTxt_Username.SendKeys(UserName); Txt_Password.SendKeys(Password); Btn_LogIn.Click(); } Console.WriteLine("Login to Flipkart Application is successfull"); }
//Enter UserName and Password and Click Login button public void Login(string UN, string PWD) { Txt_UserName.SendKeys(UN); Txt_Password.SendKeys(PWD); Btn_Login.Click(); }