public void GivenPasswordIs(string pass) { CustomControls.Entertext("//input[@placeholder='Password']", pass, propertytype.XPath); CustomControls.click("//button[normalize-space()='Sign in']", propertytype.XPath); try { CustomControls.click("//button[normalize-space()='Confirm']", propertytype.XPath); flag = 1; } catch (Exception e) { Console.WriteLine("Not able to login"); } finally { if (flag == 1) { string title = PropertiesCollection.ngdriver.Title; Console.WriteLine(title); } } }
public void GivenUserEntersSiteIdUsernameAndPasswordAsBelow(Table credentials) { PropertiesCollection.ngdriver.Manage().Window.Maximize(); dynamic Credentials = credentials.CreateDynamicInstance(); CustomControls.Entertext(PageObjects.Login_Screen(1), Credentials.site_id, propertytype.CssSelector); CustomControls.Entertext(PageObjects.Login_Screen(2), Credentials.user_id, propertytype.CssSelector); CustomControls.Entertext(PageObjects.Login_Screen(3), Credentials.password, propertytype.CssSelector); Console.WriteLine(PropertiesCollection.ngdriver.Title); }
public void ThenUserEntersBelowInformation(Table user_info) { dynamic User_info = user_info.CreateDynamicInstance(); CustomControls.Entertext(PageObjects.Create_new_Account(6), User_info.Email, propertytype.CssSelector); CustomControls.Entertext(PageObjects.Create_new_Account(7), User_info.Password, propertytype.CssSelector); CustomControls.Entertext(PageObjects.Create_new_Account(8), User_info.Confirm_password, propertytype.CssSelector); CustomControls.click(PageObjects.Create_new_Account(9), propertytype.XPath); CustomControls.click(PageObjects.Create_new_Account(10), propertytype.XPath); }
public void GivenTheUsernameIs(string username) { CustomControls.Entertext("//input[@placeholder='Email/Username']", username, propertytype.XPath); }