コード例 #1
0
        public void PurchaseToy_EnterEmptyPhoneNumber_EmptyFieldErrorAppears()
        {
            const string emptyFieldErrorText = "Заполните это поле";
            var          mainPage            = new MainPage(browser);
            var          toyInfoPage         = new ToyInfoPage(browser);

            mainPage.SelectToyClick();
            toyInfoPage.PurchaseToyClick();
            toyInfoPage.SendOrderClick();

            Assert.AreEqual(emptyFieldErrorText, toyInfoPage.GetNameErrorText());
        }
コード例 #2
0
        public void OrderToy_EnterEmptyPhoneNumber_EmptyFieldErrorAppears()
        {
            TakeScreenshotWhenTestFailed(() =>
            {
                const string emptyFieldErrorText = "Заполните это поле";
                var mainPage    = new MainPage(Driver);
                var toyInfoPage = new ToyInfoPage(Driver);

                mainPage.SelectToyClick();
                toyInfoPage.PurchaseToyClick();
                toyInfoPage.SendOrderClick();

                Assert.AreEqual(emptyFieldErrorText, toyInfoPage.GetNameErrorText());
            });
        }