public void CreateSection(String sectionName, String description = null, Boolean showInJumpTo = false,
                                  IEnumerable <String> stepNames         = null)
        {
            BtnNew.Click();
            var popup = new SmartFormSectionPropertiesPopup();

            popup.SwitchTo();
            popup.TxtName.Value = sectionName;
            if (!String.IsNullOrWhiteSpace(description))
            {
                popup.TxtDescription.Value = description;
            }
            popup.ChkShowInJumpTo.Checked = showInJumpTo;
            if (stepNames != null)
            {
                foreach (var step in stepNames)
                {
                    var chkBox = new Checkbox(By.XPath("//span[text()='" + step + "']/../../td[1]/input[@type='checkbox']"));
                    chkBox.Checked = true;
                }
            }
            popup.BtnOk.Click();
            popup.SwitchBackToParent(WaitForPopupToClose.Yes);
            Thread.Sleep(1500);
            WaitForPageLoad(5000);
        }
        public void EditSection(String sectionName, String newSectionName, String description = null,
                                Boolean?showInJumpTo = null, IEnumerable <String> stepNames = null)
        {
            var sectionLink = new Link(By.LinkText(sectionName));

            sectionLink.Click();
            var popup = new SmartFormSectionPropertiesPopup();

            popup.SwitchTo();
            if (newSectionName != null)
            {
                popup.TxtName.Value = newSectionName;
            }
            if (!String.IsNullOrWhiteSpace(description))
            {
                popup.TxtDescription.Value = description;
            }
            if (showInJumpTo != null)
            {
                popup.ChkShowInJumpTo.Checked = showInJumpTo.Value;
            }
            if (stepNames != null)
            {
                // clear existing list of steps
                var form       = new Container(By.Id("_webrRSV_DIV_0"));
                var checkboxes = form.GetDescendants(".//table/tbody/tr/td[1]/input[@type='checkbox']");
                foreach (var checkbox in checkboxes)
                {
                    checkbox.SetCheckBox(false);
                }

                // setup new list of steps
                foreach (var chkBox in stepNames.Select(step => new Checkbox(By.XPath("//span[text()='" + step + "']/../../td[1]/input[@type='checkbox']"))))
                {
                    chkBox.Checked = true;
                }
            }
            popup.BtnOk.Click();
            popup.SwitchBackToParent(WaitForPopupToClose.Yes);
            Thread.Sleep(1500);
            WaitForPageLoad(5000);
        }
        public void EditSection(String sectionName, String newSectionName, String description = null,
			Boolean? showInJumpTo = null, IEnumerable<String> stepNames = null)
        {
            var sectionLink = new Link(By.LinkText(sectionName));
            sectionLink.Click();
            var popup = new SmartFormSectionPropertiesPopup();
            popup.SwitchTo();
            if (newSectionName != null) popup.TxtName.Value = newSectionName;
            if (!String.IsNullOrWhiteSpace(description)) popup.TxtDescription.Value = description;
            if (showInJumpTo != null) popup.ChkShowInJumpTo.Checked = showInJumpTo.Value;
            if (stepNames != null) {
                // clear existing list of steps
                var form = new Container(By.Id("_webrRSV_DIV_0"));
                var checkboxes = form.GetDescendants(".//table/tbody/tr/td[1]/input[@type='checkbox']");
                foreach (var checkbox in checkboxes) {
                    checkbox.SetCheckBox(false);
                }

                // setup new list of steps
                foreach (var chkBox in stepNames.Select(step => new Checkbox(By.XPath("//span[text()='" + step + "']/../../td[1]/input[@type='checkbox']")))) {
                    chkBox.Checked = true;
                }
            }
            popup.BtnOk.Click();
            popup.SwitchBackToParent(WaitForPopupToClose.Yes);
            Thread.Sleep(1500);
            WaitForPageLoad(5000);
        }
        public void CreateSection(String sectionName, String description = null, Boolean showInJumpTo = false,
			IEnumerable<String> stepNames = null)
        {
            BtnNew.Click();
            var popup = new SmartFormSectionPropertiesPopup();
            popup.SwitchTo();
            popup.TxtName.Value = sectionName;
            if (!String.IsNullOrWhiteSpace(description))
                popup.TxtDescription.Value = description;
            popup.ChkShowInJumpTo.Checked = showInJumpTo;
            if (stepNames != null) {
                foreach (var step in stepNames) {
                    var chkBox = new Checkbox(By.XPath("//span[text()='" + step + "']/../../td[1]/input[@type='checkbox']"));
                    chkBox.Checked = true;
                }
            }
            popup.BtnOk.Click();
            popup.SwitchBackToParent(WaitForPopupToClose.Yes);
            Thread.Sleep(1500);
            WaitForPageLoad(5000);
        }