Example #1
0
        public void ClickLink(string link)
        {
            var linkElement = TemplateBrowser.GetElementByXPath(string.Format("//a[text()='{0}']", link));

            Assert.That(linkElement, Is.Not.Null, string.Format("Link with text {0} not found on page", link));
            linkElement.Click();
        }
Example #2
0
 public void TearDown()
 {
     if (ScenarioContext.Current.TestError != null)
     {
         TestReport.ErrorList.Add(ScenarioContext.Current.ScenarioInfo.Title);
         TemplateBrowser.GenerateErrorReport();
     }
 }
        public static IList GetCodeTemplates()
        {
            string          templateFolder  = HttpContext.Current.Server.MapPath("templates");
            TemplateBrowser templateBrowser = new TemplateBrowser(templateFolder);

            TemplateInfo[] templateInfos = templateBrowser.ReadTemplates();

            return(templateInfos);
        }
Example #4
0
 public void Wait(int wait)
 {
     TemplateBrowser.Wait(wait);
 }
Example #5
0
 public void SetCookie(string cookieName, string cookieValue)
 {
     TemplateBrowser.SetCookie(cookieName, cookieValue);
 }
Example #6
0
 public void SelectDropDownText(string elementId, string text)
 {
     TemplateBrowser.SelectDropDownItem(elementId, text);
 }
Example #7
0
 public void ClickElement(string elementId)
 {
     TemplateBrowser.Click(elementId);
 }
Example #8
0
 public void NavigateToPage(string page)
 {
     TemplateBrowser.NavigateToUrl(String.Format("{0}{1}", TemplateBrowser.BaseUrl, page));
 }
Example #9
0
 public void GivenIHaveNoCookiesSet()
 {
     TemplateBrowser.ClearCookies();
 }
Example #10
0
 public static void FeatureTearDown()
 {
     TemplateBrowser.Dispose();
 }
Example #11
0
 public void ElementTextShouldBe(string id, string value)
 {
     Assert.That(TemplateBrowser.GetElementText(id), Is.EqualTo(value));
 }
Example #12
0
 public void NavigateToUrl(string url)
 {
     TemplateBrowser.NavigateToUrl(url);
 }
Example #13
0
 public void WhenSearchForSpecflow()
 {
     TemplateBrowser.SetElementText("gbqfq", "specflow");
 }