//Inintialise Page Factory public ShareSkill(IWebDriver driver, int rownum) { this.driver = driver; PageFactory.InitElements(driver, this); this.rownum = rownum; ExcelLibHelper.PopulateInDataCollection((Path.Combine(AppDomain.CurrentDomain.BaseDirectory + filepath)), "ShareSkill"); }
public void LoginPage(IWebDriver driver) { this.driver = driver; driver.Navigate().GoToUrl("http://*****:*****@"C:\Users\Dell\Documents\VB Feb 2021\MarsOnboardingTask\MarsOnboardingTask\Data\TestData.xlsx"); EmailAddress.SendKeys(ExcelLibHelper.ReadData(2, "username")); Password.SendKeys(ExcelLibHelper.ReadData(2, "password")); LoginBtn.Click(); Thread.Sleep(3000); WaitClass.ElementPresent(driver, "CssSelector", "i[class='outline write icon']"); }
public ProfilePage(IWebDriver driver, int rownum) { this.driver = driver; this.rownum = rownum; ExcelLibHelper.PopulateInDataCollection((Path.Combine(AppDomain.CurrentDomain.BaseDirectory + filepath)), "Profile"); }
//Initialising driver through constructor public Managelisting(IWebDriver driver, int rownum) { this.driver = driver; this.rownum = rownum; ExcelLibHelper.PopulateInDataCollection((Path.Combine(AppDomain.CurrentDomain.BaseDirectory + filepath)), "ShareSkill"); }