Ejemplo n.º 1
0
        public void Business()
        {
            var test = extent.StartTest("Business Information Update", "Business Information details are updated");

            LeftNavigation.ClinicSettings.BusinessInformation.GoTo();
            BusinessInformationPage business = new BusinessInformationPage();

            try
            {
                business.PracticeName.Clear();
                business.Practice_Name("My Test Clinic");
                test.Log(LogStatus.Pass, "Practice Name is added");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "Practice Name is not added", e);
            }
            try
            {
                business.Owner_Manager.Clear();
                business.Owner("Emilian");
                test.Log(LogStatus.Pass, "Owner Name is added");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "Owner Name is not added", e);
            }
            try
            {
                business.Primary_contact("Ana Zina");
                test.Log(LogStatus.Pass, "Primary Contact is selected");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "Primary Contact is not selected", e);
            }
            try
            {
                business.FormsOfPayment("Cash", "Amex", "Check");
                test.Log(LogStatus.Pass, "Forms of payment are selected");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "Forms of payment are not selected", e);
            }
            try
            {
                business.Street_adress.Clear();
                business.Address("Parintele Galeriu 6c");
                test.Log(LogStatus.Pass, "Street Address is added");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "Street Address is not added", e);
            }
            try
            {
                business.Street_adress_line2.Clear();
                business.AddressLine2("Vasile Lascar 144-146");
                test.Log(LogStatus.Pass, "Street Address 2 is added");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "Street Address 2 is not added", e);
            }
            try
            {
                business.Country_("Australia");
                test.Log(LogStatus.Pass, "Country is selected");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "Country is not selected", e);
            }
            try
            {
                business.State_("Victoria");
                test.Log(LogStatus.Pass, "State is selected");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "State is not selected", e);
            }
            try
            {
                business.City.Clear();
                business.City_("Virginia Victory");
                test.Log(LogStatus.Pass, "City is added");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "City is not added", e);
            }
            try
            {
                business.Zip_Code.Clear();
                business.ZipCode("52235335");
                test.Log(LogStatus.Pass, "ZipCode is added");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "ZipCode is not added", e);
            }
            try
            {
                business.Phone.Clear();
                business.Phonse_("0743422424");
                test.Log(LogStatus.Pass, "Phone is added");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "Phone is not added", e);
            }
            try
            {
                business.Fax.Clear();
                business.Fax_("343352252");
                test.Log(LogStatus.Pass, "Fax is added");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "Fax is not added", e);
            }
            try
            {
                business.Primary_email_address.Clear();
                business.Primary_email("*****@*****.**");
                test.Log(LogStatus.Pass, "Primary Email Address is added");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "Primary Email Address is not added", e);
            }
            try
            {
                business.Primary_website_address.Clear();
                business.Primary_Website_Address("www.unifiedpractice.com");
                test.Log(LogStatus.Pass, "Primary Website Address is added");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "Primary Website Address is not added", e);
            }
            try
            {
                business.Submit();
                test.Log(LogStatus.Pass, "Submit button is clicked");
            }
            catch (Exception e)
            {
                test.Log(LogStatus.Fail, "Submit button is not clicked", e);
            }
            business.Add_BusinessInformation("B", "B", "B", "B", "", "Alaska", "Col", "B", "1", "123", "a", "www", "Vlad Petre", "Cash, Amex, Check, MasterCard");
            extent.EndTest(test);
            extent.Flush();
        }
Ejemplo n.º 2
0
        public static VehicleInfoPage EnterCustomerInformation(this EffectiveDatePage effectiveDatePage, CustomerInformation customerInformation)
        {
            ParameterValidator.ValidateNotNull(effectiveDatePage, "EffectiveDatePage");
            ParameterValidator.ValidateNotNull(customerInformation, "Customer Information");

            //1. Enter customer @effectivedate and select next
            DotNumberPage dotNumberPage = effectiveDatePage.SelectEffectiveDate(customerInformation.EffectiveDate).SelectNextButton();

            // verification
            dotNumberPage.ValidateDotNumberPageDisplayed();

            //2. Enter @DOTInfo
            EntityTypePage entityTypePage = dotNumberPage.EnterDotNumber(customerInformation.DotNumber);

            //3. Select @EntityType and select next
            BusinessInformationPage businessInformationPage = entityTypePage.SelectEntityType(customerInformation.EntityType)
                                                              .SelectNextButton();

            // verification
            businessInformationPage.ValidateBusinessInformationPageDisplayed();

            //4. If valid DOT was given, confrim business @name and @address and select next
            // If no Dot or invalid DOT was given, complete @name and @address and select next
            if (customerInformation.FilledOutBusinessInformation != null)
            {
                businessInformationPage.ValidateBusinessNameIsFilledOut(customerInformation.FilledOutBusinessInformation.CustomerName)
                .ValidateDBAIsFilledOut(customerInformation.FilledOutBusinessInformation.DBA)
                .ValidateAddressFieldsAreFilledOut(customerInformation.FilledOutBusinessInformation.Address);
            }

            if (customerInformation.BusinessInformation != null)
            {
                businessInformationPage.InputBusinessInformation(customerInformation.BusinessInformation);
            }

            PrimaryOfficerPage primaryOfficerPage = businessInformationPage.SelectNextButton();

            //verification
            primaryOfficerPage.ValidatePrimaryOfficerPageDisplayed();

            //5. Enter Primary officer information (@POName, @POAddress) and select next
            CustomerInfoPage customerInfoPage = new CustomerInfoPage();

            if (customerInformation.EntityType == "Individual")
            {
                // verification
                primaryOfficerPage.ValidatePrimaryOfficerNameAreFilledOut(customerInformation.POName).ValidatePrimaryOfficerNameDisabled();
                // Enter POAddress
                primaryOfficerPage.InputPrimaryOfficerAddress(customerInformation.POAddress).SelectNextButton();
            }
            else
            {
                //Enter POName and POAddress
                primaryOfficerPage.InputPrimaryOfficer(customerInformation.POName, customerInformation.POAddress).SelectNextButton();
            }

            //verification
            customerInfoPage.ValidateCustomerInfoPageDisplayed();

            //6. Enter @LiabilityLosses and select Next
            VehicleInfoPage vehicleInfoPage = customerInfoPage.EnterCustomerInfo(customerInformation.CustomerAdditionalInformation).SelectNextButton();

            //verification
            vehicleInfoPage.ValidateVehicleInfoPageDisplayed();
            return(vehicleInfoPage);
        }