public override void Perform(SeleniumSideModel tests, SeleniumTestModel test, SeleniumCommandModel comand)
        {
            var element = SearchElement(comand);

            element
            .Should()
            .NotBeNull();
        }
예제 #2
0
        public override void Perform(SeleniumSideModel tests, SeleniumTestModel test, SeleniumCommandModel comand)
        {
            var size = comand.Target.Split('x');

            if (size.Length > 1)
            {
                Current.Driver.Manage().Window.Size = new Size(size[0].ToInt(), size[1].ToInt());
            }
        }
        public override void Perform(SeleniumSideModel tests, SeleniumTestModel test, SeleniumCommandModel comand)
        {
            Current.LastAlert
            .Should()
            .NotBeNull();

            Current.LastAlert
            .Should()
            .Be(comand.Target);
        }
예제 #4
0
        public override void Perform(SeleniumSideModel tests, SeleniumTestModel test, SeleniumCommandModel comand)
        {
            var alert = Current.Driver.SwitchTo().Alert();

            alert
            .Should()
            .NotBeNull();

            Current.LastAlert = alert.Text;

            alert.Dismiss();
        }
예제 #5
0
        public override void Perform(SeleniumSideModel tests, SeleniumTestModel test, SeleniumCommandModel comand)
        {
            Wait(1000 * 2);

            if (!comand.Target.ContainsText("="))
            {
                return;
            }

            var index = comand.Target.Split('=')[1].ToInt();

            Current.Driver.SwitchTo().Frame(frameIndex: index);
        }
예제 #6
0
        private void PerformCommand(SeleniumSideModel tests, Context context, SeleniumTestModel test, SeleniumCommandModel command)
        {
            var current = CommandFactory.Create(context, command.Command);

            if (!(current is INextCommand))
            {
                current.Perform(tests, test, command);
            }
            if (context.LastCommand is INextCommand)
            {
                context.LastCommand.Perform(tests, test, command);
            }
            context.LastCommand = current;
        }
예제 #7
0
        public override void Perform(SeleniumSideModel tests, SeleniumTestModel test, SeleniumCommandModel comand)
        {
            var element = SearchElement(comand);

            element
            .Should()
            .NotBeNull();

            var preventDefault = false;

            var customEvent = GetCustomEvent <ClickCommandDelegate>();

            customEvent?.Invoke(tests, test, comand, element, ref preventDefault);

            if (!preventDefault)
            {
                element.Click();
            }
        }
예제 #8
0
 public override void Perform(SeleniumSideModel tests, SeleniumTestModel test, SeleniumCommandModel comand)
 {
     Current.Driver.Close();
 }
예제 #9
0
 public abstract void Perform(SeleniumSideModel tests, SeleniumTestModel test, SeleniumCommandModel comand);
예제 #10
0
 public override void Perform(SeleniumSideModel tests, SeleniumTestModel test, SeleniumCommandModel comand)
 {
 }
예제 #11
0
 public override void Perform(SeleniumSideModel tests, SeleniumTestModel test, SeleniumCommandModel comand)
 {
     Current.Driver.Navigate().GoToUrl(tests.Url + comand.Target);
 }