public void RegistrationTest()
        {
            var homePage = new HomePageBL(webDriver);

            homePage
            .ClickOnCreateAnAccountButton()
            .CreateAnAccount();

            var expectedResult = "My Account";
            var actualResult   = new SuccessfulRegistrationPageBL(webDriver).GetMyAccountTitle();

            Assert.IsTrue(actualResult.Contains(expectedResult));
        }
コード例 #2
0
        public void ChangePasswordTest()
        {
            var homePage = new HomePageBL(webDriver);

            homePage
            .ClickOnCreateAnAccountButton()
            .CreateAnAccount()
            .ClickOnChangePasswordLink();

            var expectedEditAccountTitle = "Edit Account Information";
            var actualTitle = new EditAccountInformationPageBL(webDriver).GetEditAccountTitle();

            Assert.IsTrue(actualTitle.Contains(expectedEditAccountTitle));

            var changePassword = new EditAccountInformationPageBL(webDriver);

            changePassword
            .ChangePassword();
            var expectedSuccessMessage = "You saved the account information.";
            var actual = new SuccessfulRegistrationPageBL(webDriver).GetSuccessSavingInformationMessage();

            Assert.IsTrue(actual.Contains(expectedSuccessMessage));
        }