Пример #1
0
        public void Address_WhenEnterValidAddress_ReturnsSuccessMessage()
        {
            _driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);

            _loginHelper.LoginAdmin();

            // Populate the elements and submit form
            _page.PopulateAddressCountry("Canada");
            _page.PopulateAddressFullName("John Doe");
            _page.PopulateAddressStreetAddress("372 Random Road");
            _page.PopulateAddressCity("Waterloo");
            _page.PopulateAddressStateProvinceRegion("Ontario");
            _page.PopulateAddressPostalCode("N1P1H1");
            _page.ClickCreate();

            Assert.Equal("Your addresses", _page.Title);
            Assert.Contains("Canada", _page.Source);
            Assert.Contains("John Doe", _page.Source);
            Assert.Contains("372 Random Road", _page.Source);
            Assert.Contains("Waterloo", _page.Source);
            Assert.Contains("Ontario", _page.Source);
            Assert.Contains("N1P1H1", _page.Source);
        }