Пример #1
0
        public void EditTest(string key, string value, bool errorExpected)
        {
            foreach (var driver in Driver.Current)
            {
                AddressPage addressPagecs = new AddressPage(driver);

                addressPagecs.EditRow(_id);

                EditPage editPage = new EditPage(driver, _id);

                Dictionary <string, string> newData = new Dictionary <string, string>();
                newData      = editPage.GetDatafromForm();
                newData[key] = value;

                AddressPageModel addressPageModel = new AddressPageModel();
                addressPageModel.CreateData(newData);
                editPage.FeedDataToPageForm(addressPageModel);



                if (!("http://a.testaddressbook.com/addresses/" + _id == driver.Url))
                {
                    bool temp = editPage.IsError();
                    Assert.IsTrue(temp == errorExpected);
                }
            }
        }