public void COLLECT_Account_Signup_Actions_MainBody_01_WhenUserNavigatedToLogonPageSuccessfully()
        {
            var accountSignupPage = new AccountSignupPage(Driver);
            var accountLoginPage  = accountSignupPage
                                    .Open()
                                    .ClickOnLoginLink();

            Verify.IsTrue(accountLoginPage.AmIOnAccountLoginPage, "User is not navigated to login page");
        }
        public void COLLECT_Account_Signup_Actions_MainBody_02_WhenUserClickOnDialCodeLinkThenAllCountryListShouldBeDisplayed()
        {
            var accountSignupPage = new AccountSignupPage(Driver);

            accountSignupPage
            .Open()
            .ClickOnCountryCodeButton();

            Verify.IsTrue(accountSignupPage.CountryListExists, "Country list is not present on the page after clicking the dial code button");
        }
        public void COLLECT_Account_Signup_Actions_MainBody_01_WhenUserClicksOnMuchMoreLinkThenUserNavigatedToMobileDataCollectionAppPage()
        {
            var accountSignupPage = new AccountSignupPage(Driver);

            accountSignupPage
            .Open()
            .ClickOnMuchMoreHyperLink();

            Verify.IsTrue(accountSignupPage.AmIOnMobileDataAppPage, "User is not navigated to Mobile Data App page after clicking on much more link");
        }
        public void COLLECT_Account_Signup_Actions_MainBody_03_WhenUserClickOnDialCodeLinkThenUserShouldBeAbleToSelectAnyOneCountry()
        {
            var accountSignupPage = new AccountSignupPage(Driver);

            accountSignupPage
            .Open()
            .ClickOnCountryCodeButton()
            .SelectOneCountry();

            Verify.IsTrue(accountSignupPage.DidUserAbleToSelectOneCountry, "User is not able to select the country from drop down list");
        }
        public void COLLECT_Account_Signup_Actions_MainBody_01_WhenUserClicksOnPrivacyPolicyLinkThenPrivacyPolicyPDFOpenedInNewTab()
        {
            var accountSignupPage = new AccountSignupPage(Driver);

            accountSignupPage
            .Open()
            .ClickOnPrivacyPolicyLink()
            .SwitchToNewTab();

            Verify.IsTrue(accountSignupPage.AmIOnPrivacyPolicyPage, "User is not present on Privacy Policy page");
        }
        public void COLLECT_Account_Signup_Actions_MainBody_01_WhenUserClicksOnTermsOfServicesLinkThenLicenseAgreementPDFOpenedInNewTab()
        {
            var accountSignupPage = new AccountSignupPage(Driver);

            accountSignupPage
            .Open()
            .ClickOnTermsOfServiceLink()
            .SwitchToNewTab();

            Verify.IsTrue(accountSignupPage.AmIOnTermsOfServicePage, "User is not present on Terms of Service page");
        }
        public void COLLECT_Account_Signup_Actions_MainBody_01_WhenUserClickOnSignInWithGoogleButtonThenUserIsNavigatedToNewWindowUserSigninPage()
        {
            var accountSignupPage = new AccountSignupPage(Driver);
            var googleAccountPage = new GoogleAccountPage(Driver);

            accountSignupPage
            .Open()
            .ClickOnGoogleSignButton();

            googleAccountPage.SwitchToNewGoogleWindow();

            Verify.IsTrue(googleAccountPage.AmIOnGoogleAccountPage, "User is not navigated to google account page");
        }
        public void COLLECT_Account_Signup_Actions_MainBody_04_WhenAllRequiredFieldsAreFilledThenSignUpSucceedsAndUserRedirectedToFormsPage()
        {
            _user.UserName         = "******";
            _user.OrganizationName = "TestingCompany";

            _user.Country     = "Canada";
            _user.PhoneNumber = "1234567890";

            _user.Email    = "*****@*****.**";
            _user.Password = "******";
            var accountSignupPage = new AccountSignupPage(Driver);
            var createFormPage    = accountSignupPage
                                    .SignUp(_user.UserName, _user.OrganizationName,
                                            _user.Country, _user.PhoneNumber,
                                            _user.Email, _user.Password);

            Verify.IsTrue(createFormPage.AmIOnCreateFormPage, "User is not present on create form page");
        }
        public void COLLECT_Account_Signup_Actions_MainBody_05_WhenUserAttemptsToSignupWithEmptyPasswordFieldThenErrorMessageShouldBeDisplayed()
        {
            _user.UserName         = "******";
            _user.OrganizationName = "TestingCompany";

            _user.Country     = "Canada";
            _user.PhoneNumber = "1234567890";

            _user.Email    = "*****@*****.**";
            _user.Password = "";
            var accountSignupPage = new AccountSignupPage(Driver);

            accountSignupPage
            .SignUp(_user.UserName, _user.OrganizationName,
                    _user.Country, _user.PhoneNumber,
                    _user.Email, _user.Password);

            Verify.IsTrue(accountSignupPage.AmIOnAccountSignupPage, "User is not present on sign up page");
        }
        public void COLLECT_Account_Signup_Actions_MainBody_01_WhenUserAttemptsToSignupWithInvalidEmailFieldThenErrorMessageShouldBeDisplayed()
        {
            _user.UserName         = "******";
            _user.OrganizationName = "TestingCompany";

            _user.Country     = "Canada";
            _user.PhoneNumber = "1234567890";

            _user.Email    = "AutomationTesting1";
            _user.Password = "******";
            var accountSignupPage = new AccountSignupPage(Driver);

            accountSignupPage
            .SignUp(_user.UserName, _user.OrganizationName,
                    _user.Country, _user.PhoneNumber,
                    _user.Email, _user.Password);
            var actualErrorText = accountSignupPage.InvalidEmailErrorText;

            Verify.VerifyFieldUsingConst(actualErrorText, "Please enter a valid email address.", "Invalid email error text is not correct");
        }