@Test public void SignIn() throws Exception { TourHomePage homePage = PageFactory.initElements(GlobDriver.getInstance().getDriver(), TourHomePage.class); homePage.go(); homePage.clickLinkSign(); TourSignInPage sign = PageFactory.initElements(GlobDriver.getInstance().getDriver(), TourSignInPage.class); sign.fillUserInformation("*****@*****.**", "facil"); sign.clickSubmit(); TourFlightFinder signInConfirm = PageFactory.initElements(GlobDriver.getInstance().getDriver(), TourFlightFinder.class); Assert.assertTrue(signInConfirm.getSignOffLinkText().contains("SIGN-OFF")); }
@Test(dataProvider = "fillRegister") public void AddNewUser( String firstName, String lastName, String phone, String userName, String address, String city, String state, String postalCode, String country, String email, String password, String confirmPassword) throws Exception { TourHomePage homePage = PageFactory.initElements(GlobDriver.getInstance().getDriver(), TourHomePage.class); homePage.go(); homePage.clickLinkReg(); TourRegisterPage TourPage = PageFactory.initElements(GlobDriver.getInstance().getDriver(), TourRegisterPage.class); TourPage.fillContactInformation(firstName, lastName, phone, userName); TourPage.fillMailingInformation(address, city, state, postalCode, country); TourPage.fillUserInformation(userName, password, confirmPassword); TourPage.clickSubmit(); TourConfirmRegister registerConf = PageFactory.initElements(GlobDriver.getInstance().getDriver(), TourConfirmRegister.class); Assert.assertTrue( registerConf .getConfirmRegister() .contains( "Thank you for registering. You may now sign-in using the user name and password you've just entered."), "El texto deseado no existe."); }
@AfterSuite public void afterSuite() { GlobDriver.getInstance().tearDown(); }
@BeforeSuite public void BeforeSuite(ITestContext context) { GlobDriver.getInstance().tearUp(context); }