示例#1
0
        public void Should_BePossibleTo_CreateDifferentBrowsersInDifferentThreads()
        {
            var thread01 = new Thread(() =>
            {
                var checkBoxesForm = new CheckBoxesForm();
                checkBoxesForm.Open();
                Assert.AreEqual(checkBoxesForm.Url, AqualityServices.Browser.CurrentUrl);
                AqualityServices.Browser.Quit();
            });
            var thread02 = new Thread(() =>
            {
                var authForm = new AuthenticationForm();
                authForm.Open();
                Assert.AreEqual(authForm.Url, AqualityServices.Browser.CurrentUrl);
                AqualityServices.Browser.Quit();
            });

            thread01.Start();
            thread02.Start();

            thread01.Join();
            thread02.Join();

            thread01.Interrupt();
            thread02.Interrupt();
        }
示例#2
0
        public void ShouldBe_PossibleTo_CreateCustomTextBox()
        {
            var authForm = new AuthenticationForm();

            authForm.Open();
            var userNameTxb = authForm.UserNameTextBox;

            var userNameCustomTxb = new CustomTextBox(userNameTxb.Locator, userNameTxb.Name);

            userNameTxb.Type("wrong");
            userNameCustomTxb.Type("right");
            Assert.AreEqual(userNameTxb.Value, userNameCustomTxb.Text);
        }
 public void BeforeTest()
 {
     authForm.Open();
 }