public static void LoginFromConfigFile() { NavigateToUrl(ObjectRepository.Config.GetWebSite()); DropDownListHelper.SelectElementByText(By.Id("cmbCompanies"), "Vered Hasharon"); LoginPagePOM veredLog = new LoginPagePOM(ObjectRepository.Driver); WelcomToTcoPage veredWelcom = veredLog.ClickLogin(ObjectRepository.Config.GetVeredUser(), ObjectRepository.Config.GetVeredPassword()); }
public void GivenTheLoginFormContainsInvalidEmailAndInvalidPassword() { var loginPage = new LoginPagePOM(_driver); loginPage.GoToPage(); loginPage.PopulateLoginForm(Constants.EmailInValid, Constants.PasswordInvalid); }
public void OpenTheQuoteByIdAndReachTheQuotationPage() { NavigationHelper.NavigateToUrl(ObjectRepository.Config.GetWebSite()); DropDownListHelper.SelectElementByText(By.Id("cmbCompanies"), "Vered Hasharon"); LoginPagePOM veredLog = new LoginPagePOM(ObjectRepository.Driver); WelcomToTcoPage veredWelcom = veredLog.ClickLogin(ObjectRepository.Config.GetVeredUser(), ObjectRepository.Config.GetVeredPassword()); QuotationsList verdquote = veredWelcom.ClickIncoming(); // var mainWindow = BrowserHelper.GettheParentPage(); verdquote.ticTcheckBoxAll(); verdquote.clickShowButton(); // make sure that you are in the right page -->assert the title of the page Assert.AreEqual("QUOTATION / GROUPS LIST", verdquote.PageTitle, "the titles are not equals"); var HoverAnElement = ObjectRepository.Driver.FindElement(By.XPath("//td[@id='ctl00_ContentPlaceHolder1_mnuTopn0']//a[contains(text(),'Sheets')]")); var ElementClick = ObjectRepository.Driver.FindElement(By.XPath("//a[contains(text(),'Open Calc.sheet/Group by number')]")); MouseActionsHelper.HoverAndClick(ObjectRepository.Driver, HoverAnElement, ElementClick); //switch to the new frame by invoking OpenExistingQuote Method GenericHelper.OpenExistingQuote(TestContext.DataRow["QuotationId"].ToString()); Thread.Sleep(2000); //switch to the new window BrowserHelper.SwitchToWindow(1); }
public void GivenTheIAmOnTheHomepage() { var loginPage = new LoginPagePOM(_driver); loginPage.GoToPage(); loginPage.PopulateLoginForm(Constants.EmailValid, Constants.PasswordValid); loginPage.LoginSubmitBtn().Click(); }
public static void Test_LoggInVeredHasharon() { NavigationHelper.NavigateToUrl(ObjectRepository.Config.GetWebSite()); DropDownListHelper.SelectElementByText(By.Id("cmbCompanies"), "Vered Hasharon"); LoginPagePOM veredLog = new LoginPagePOM(ObjectRepository.Driver); WelcomToTcoPage veredWelcom = veredLog.ClickLogin(ObjectRepository.Config.GetVeredUser(), ObjectRepository.Config.GetVeredPassword()); QuotationsList verdquote = veredWelcom.ClickIncoming(); }
public void Test_GetUserNameInValid() { NavigationHelper.NavigateToUrl(ObjectRepository.Config.GetWebSite()); DropDownListHelper.SelectElementByText(By.Id("cmbCompanies"), "Vered Hasharon"); LoginPagePOM Login = new LoginPagePOM(ObjectRepository.Driver); WelcomToTcoPage verdWelcom = Login.ClickLogin(ObjectRepository.Config.GetVeredUser(), ObjectRepository.Config.GetVeredPassword()); var UserName = verdWelcom.GetUserName(); Assert.AreEqual("Vered Hasharon 2", UserName, "the user names are not equals"); }
public static void SelectIncoming() { LoginFromConfigFile(); LoginPagePOM LogMe = new LoginPagePOM(ObjectRepository.Driver); QuotationsList quoteList = LogMe.WelcomToTco.ClickIncoming(); //Assert that you are in the right page Assert.AreEqual("QUOTATION / GROUPS LIST", quoteList.PageTitle, "the titles are not equals"); var HoverAnElement = ObjectRepository.Driver.FindElement(By.XPath("//td[@id='ctl00_ContentPlaceHolder1_mnuTopn0']//a[contains(text(),'Sheets')]")); var ElementClick = ObjectRepository.Driver.FindElement(By.XPath("//a[contains(text(),'New Calc.sheet')]")); MouseActionsHelper.HoverAndClick(ObjectRepository.Driver, HoverAnElement, ElementClick); }
public static void SelectIncomingToursAndOpenById() { LoginFromConfigFile(); LoginPagePOM LogMe = new LoginPagePOM(ObjectRepository.Driver); QuotationsList quoteList = LogMe.WelcomToTco.ClickIncoming(); string FilePath = @"E:\Users\Bassam\Documents\Training\DataDriven\ExcelTestData\TcoData.xlsx"; //Assert that you are in the right page Assert.AreEqual("QUOTATION / GROUPS LIST", quoteList.PageTitle, "the titles are not equals"); var HoverAnElement = ObjectRepository.Driver.FindElement(By.XPath("//td[@id='ctl00_ContentPlaceHolder1_mnuTopn0']//a[contains(text(),'Sheets')]")); var ElementClick = ObjectRepository.Driver.FindElement(By.XPath("//a[contains(text(),'Open Calc.sheet/Group by number')]")); MouseActionsHelper.HoverAndClick(ObjectRepository.Driver, HoverAnElement, ElementClick); //switch to the new frame by invoking OpenExistingQuote Method GenericHelper.OpenExistingQuote(ExcelReaderHelper.GetCelldata(FilePath, "Quotations", 1, 0).ToString()); }
public void ThenAValidationMessageIsDisplayed(string expectedMessage) { var loginPage = new LoginPagePOM(_driver); loginPage.ValidationContent().Text.Should().Be(expectedMessage); }
public void WhenISubmitTheLoginForm() { var loginPage = new LoginPagePOM(_driver); loginPage.LoginSubmitBtn().Click(); }
public static void SelectClerkMenu() { LoginFromConfigFile(); var logMe = new LoginPagePOM(ObjectRepository.Driver); }