コード例 #1
0
  @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"));
  }
コード例 #2
0
  @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.");
  }
コード例 #3
0
 @AfterSuite
 public void afterSuite() {
   GlobDriver.getInstance().tearDown();
 }
コード例 #4
0
 @BeforeSuite
 public void BeforeSuite(ITestContext context) {
   GlobDriver.getInstance().tearUp(context);
 }