[Test]//Login with incorrect Password public void LoginIncorrectPassword() { IWebDriver driver = new FirefoxDriver(); LaunchPage lPage = new LaunchPage(driver); PageFactory.InitElements(driver, lPage); Login l = lPage.goToLoginPage(); CSPPages.Pages.Support home = l.dologin("*****@*****.**", "Ultimate02"); driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10)); Assert.AreEqual(l.Errormessage.Text, "Your login attempt has failed. Make sure the username and password are correct."); }
[Test]//Login Succesfully into CSP public void LoginIntoCsp() { IWebDriver driver = new FirefoxDriver(); LaunchPage lPage = new LaunchPage(driver); PageFactory.InitElements(driver, lPage); Login l = lPage.goToLoginPage(); CSPPages.Pages.Support home = l.dologin("*****@*****.**", "Ultimate01"); driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10)); Assert.True(home.HomeImage.Displayed); }
[Test]//Clicking the project center tab public void TestProjectCenter() { IWebDriver driver = new FirefoxDriver(); LaunchPage lPage = new LaunchPage(driver); PageFactory.InitElements(driver, lPage); Login l = lPage.goToLoginPage(); CSPPages.Pages.Support home = l.dologin("*****@*****.**", "Communitytest3"); ProjectCenter Project = new ProjectCenter(driver); PageFactory.InitElements(driver, Project); }
[Test]//Click on Support Tab public void TestSupport() { IWebDriver driver = new FirefoxDriver(); LaunchPage lPage = new LaunchPage(driver); PageFactory.InitElements(driver, lPage); Login l = lPage.goToLoginPage(); CSPPages.Pages.Support home = l.dologin("*****@*****.**", "Communitytest3"); home.ClickSupport(); // Assert.AreEqual(driver.Title, "Support"); }