public void EditStep(String name, String newName = null, String viewName      = null, String defaultNextStep = null,
                             Double?displayOrder         = null, Boolean?showInJumpTo = null, Boolean?showInPrinting = null)
        {
            var parentWindow = CurrentWindowTitle;
            var lnkStep      = new Link(By.LinkText(name));

            lnkStep.Click();
            var stepPopup = new NewStepPopup();

            PopUpWindow.SwitchTo("SmartForm Step");
            if (newName != null)
            {
                stepPopup.TxtName.Value = newName;
            }
            if (viewName != null)
            {
                stepPopup.BtnSelectView.Click();
                PopUpWindow.SwitchTo("Select View");
                ViewChooserPopup.SelectView(viewName);
                ViewChooserPopup.BtnOk.Click();
                PopUpWindow.SwitchTo("SmartForm Step");
            }
            if (defaultNextStep != null)
            {
                stepPopup.SelDefaultNextStep.SelectOption(defaultNextStep);
            }
            if (displayOrder != null)
            {
                stepPopup.TxtDisplayOrder.Value = Convert.ToString(displayOrder, CultureInfo.InvariantCulture);
            }
            if (showInJumpTo != null)
            {
                stepPopup.ChkShowInJumpTo.Checked = showInJumpTo.Value;
            }
            if (showInPrinting != null)
            {
                stepPopup.ChkShowInPrinting.Checked = showInPrinting.Value;
            }
            stepPopup.BtnOk.Click();
            PopUpWindow.SwitchTo(parentWindow);
            Wait.Until(d => new Link(By.LinkText(newName)).Exists);
        }
        public void EditStep(String name, String newName = null, String viewName = null, String defaultNextStep = null,
			Double? displayOrder = null, Boolean? showInJumpTo = null, Boolean? showInPrinting = null)
        {
            var parentWindow = CurrentWindowTitle;
            var lnkStep = new Link(By.LinkText(name));
            lnkStep.Click();
            var stepPopup = new NewStepPopup();
            PopUpWindow.SwitchTo("SmartForm Step");
            if (newName != null) stepPopup.TxtName.Value = newName;
            if (viewName != null) {
                stepPopup.BtnSelectView.Click();
                PopUpWindow.SwitchTo("Select View");
                ViewChooserPopup.SelectView(viewName);
                ViewChooserPopup.BtnOk.Click();
                PopUpWindow.SwitchTo("SmartForm Step");
            }
            if (defaultNextStep != null) stepPopup.SelDefaultNextStep.SelectOption(defaultNextStep);
            if (displayOrder != null) stepPopup.TxtDisplayOrder.Value = Convert.ToString(displayOrder, CultureInfo.InvariantCulture);
            if (showInJumpTo != null) stepPopup.ChkShowInJumpTo.Checked = showInJumpTo.Value;
            if (showInPrinting != null) stepPopup.ChkShowInPrinting.Checked = showInPrinting.Value;
            stepPopup.BtnOk.Click();
            PopUpWindow.SwitchTo(parentWindow);
            Wait.Until(d => new Link(By.LinkText(newName)).Exists);
        }