public void Action(JavaScriptEvent _event)
 {
     if (_event == JavaScriptEvent.Click) {
         Click();
     } else {
         throw new NotImplementedException(_event);
     }
 }
        public StepViewModel(StepTypes type, JavaScriptEvent ev)
        {
            IsSelected = true;
            Status = null;
            StepType = CollectionViewSource.GetDefaultView(StepTypeCollection);
            JavaScriptEvents = new ListCollectionView(new[] { JavaScriptEvent.Click, JavaScriptEvent.KeyUp });

            StepType.CurrentChanged += OnStepTypeChanged;
            JavaScriptEvents.CurrentChanged += OnJavaScriptEventsChanged;

            StepType.MoveCurrentTo(type);
            JavaScriptEvents.MoveCurrentTo(ev);
        }
 private void FireJQueryEvent(IWebElement element, JavaScriptEvent javaScriptEvent)
 {
     var eventName = javaScriptEvent.Name;
     javaScript.Execute(string.Format("$(arguments[0]).{0}();", eventName), element);
 }
 public ActionTag(Tag tag, JavaScriptEvent action)
     : this()
 {
     Action = action;
     Tag = tag;
 }