public void PopulateBillingInfo(BillingDetailItem purchaser)
        {
            if (purchaser == null)
            {
                return;
            }

            SetBillingTextInfo(FirstNameText, purchaser.FirstName);
            SetBillingTextInfo(LastNameText, purchaser.LastName);
            SetBillingTextInfo(CompanyNameText, purchaser.CompanyName);
            SetBillingTextInfo(AddressLine1Text, purchaser.AddressLine1);
            SetBillingTextInfo(AddressLine2Text, purchaser.AddressLine2);
            SetBillingTextInfo(CityText, purchaser.City);
            SetBillingTextInfo(PostalCodeText, purchaser.PostalCode);
            SetBillingTextInfo(PhoneNumberText, purchaser.PhoneNumber);
            SetBillingTextInfo(EmailAddressText, purchaser.EmailAddress);
            SetBillingTextInfo(OrderNotesText, purchaser.OrderNotes);

            SetBillingDropdownInfo(CountryDropDown, purchaser.Country);
            WaitForAjax();

            SetBillingDropdownInfo(StateDropDown, purchaser.State);
            WaitForAjax();

            if (purchaser.CreateAccount && !CreateAccountCheckbox.Checked)
            {
                Debug.WriteLine("CheckoutPage.PopulateBillingInfo() -- call CreateAccountCheckbox.Click");
                CreateAccountCheckbox.Check();
                WaitForAjax();
            }
        }
Ejemplo n.º 2
0
        private void CreateBillingInfo()
        {
            string exeLocation = System.Reflection.Assembly.GetExecutingAssembly().Location;
            string exeFolder   = Path.GetDirectoryName(exeLocation);
            string configFile  = Directory.GetFiles(Path.Combine(exeFolder, "Tests"), "BillingUserInfo.*").FirstOrDefault();
            ////string pathToJson = Path.Combine(exeFolder, @"Tests\BillingUserInfo.json");

            var config = new ConfigurationBuilder()
                         .AddJsonFile(configFile, optional: false, reloadOnChange: true)
                         .Build();

            Assert.IsNotNull(config);

            _billinInfo = config.GetSection("billingDetailItem").Get <BillingDetailItem>();
        }