예제 #1
0
        public void AreEqualTest2()
        {
            string expected = "Foo";
            string actual   = "Bar";

            TestCommandHelper.AssertAreEqual(expected, actual);
        }
예제 #2
0
        public static void ExecuteInternal(ITestContext context)
        {
            if (null == context)
            {
                throw new ArgumentNullException("context");
            }

            var expected = Convert.ToInt16(context.Value);
            var actual   = GetActual(context);

            TestCommandHelper.AssertAreEqual(expected, actual);
        }
        public static void ExecuteInternal(ITestContext context)
        {
            if (null == context)
            {
                throw new ArgumentNullException("context");
            }

            var expected = context.GetAbsoluteUrl(context.Target);
            var actual   = context.Driver.Url;

            TestCommandHelper.AssertAreEqual(expected, actual);
        }
예제 #4
0
        public static void ExecuteInternal(ITestContext context)
        {
            if (null == context)
            {
                throw new ArgumentNullException("context");
            }

            var element  = context.FindElement(context.Target);
            var expected = context.Value;
            var actual   = element.GetAttribute("value");

            TestCommandHelper.AssertAreEqual(expected, actual);
        }
예제 #5
0
        public static void ExecuteInternal(ITestContext context)
        {
            if (null == context)
            {
                throw new ArgumentNullException("context");
            }

            var cookie   = context.Driver.Manage().Cookies.GetCookieNamed(context.Target);
            var expected = context.Value;
            var actual   = cookie.Value;

            TestCommandHelper.AssertAreEqual(expected, actual);
        }
예제 #6
0
        public static void ExecuteInternal(ITestContext context)
        {
            if (null == context)
            {
                throw new ArgumentNullException("context");
            }

            var cookies = context.Driver.Manage().Cookies.AllCookies;

            foreach (var cookie in cookies)
            {
                var expected = context.Target;
                var actual   = cookie.ToString();

                TestCommandHelper.AssertAreEqual(expected, actual);
            }
        }
예제 #7
0
        public static void ExecuteInternal(ITestContext context)
        {
            if (null == context)
            {
                throw new ArgumentNullException("context");
            }

            var alert = context.Driver.SwitchTo().Alert();

            try
            {
                var expected = context.Target;
                var actual   = alert.Text;
                TestCommandHelper.AssertAreEqual(expected, actual);
            }
            finally
            {
                alert.Accept();
            }
        }