//Role //[FindsBy(How = How.Id, Using = "ctl19_rptDashBoard_ctl01_hypPageURL")] //public IWebElement Role { get; set; } //User //[FindsBy(How = How.Id, Using = "ctl19_rptDashBoard_ctl02_hypPageURL")] //public IWebElement User { get; set; } public void LogIn(string Username, string Password) { Browser.MaximizeWindow(); IWebElement UserNameLink = Browser.WaitForElement(By.Id("ctl14_UserName"), 15); UserNameLink.Click(); UserNameLink.Clear(); UserNameLink.SendKeys(Username); PasswordLink.Click(); PasswordLink.Clear(); PasswordLink.SendKeys(Password); LoginLink.Click(); }
public async Task <PasswordLink> SaveLink(string email) { var check_link = await GetResetLinkByEmail(email); if (check_link != null) { await DeletePasswordLink(check_link.Link); } var p_link = new PasswordLink(); p_link.Email = email; p_link.Link = GenerateRandomLink(100, true); _context.PasswordLink.Add(p_link); await _context.SaveChangesAsync(); return(p_link); }