Beispiel #1
0
 public void NavigationTest(Journals j)
 {
     driverForJournals.Navigate().GoToUrl(string.Concat(ResourceFile.BaseUrl, j.jName));
     foreach (var item in j.jMenu)
     {
         if (nameof(item.menuItem) == "menuItem")
         {
             //Console.WriteLine("---- {0}", item.menuItem.ToString());
             string a = string.Concat("++++ {0}", item.menuItem.ToString(), "in journal ", j.jName, "not found");
             //logger.Info("Checking if element exists {0}, its XPath: {1}", item.menuItem, jp.menuItemXPath);
             Assert.True(driverForJournals.FindElement(By.XPath(jp.menuItemXPath.Replace("***", item.menuItem))).Enabled, a);
             //accumulator.Accumulate(() => Assert.True(driverForJournals.FindElement(By.XPath(jp.menuItemXPath.Replace("***", item.menuItem))).Enabled));
         }
         if (nameof(item.menuHeader) == "menuHeader")
         {
             //Console.WriteLine("==== {0}", item.menuHeader.ToString());
             string a = string.Concat("++++ {0}", item.menuHeader.ToString(), "in journal ", j.jName, "not found");
             //logger.Info("Checking if element exists {0}, its XPath: {1}", item.menuHeader, jp.menuHeaderXPath);
             Assert.True(driverForJournals.FindElement(By.XPath(jp.menuHeaderXPath.Replace("***", item.menuHeader))).Enabled, a);
             //accumulator.Accumulate(() => Assert.True(driverForJournals.FindElement(By.XPath(jp.menuHeaderXPath.Replace("***", item.menuHeader))).Enabled, a));
         }
     }
     accumulator.Release();
 }
Beispiel #2
0
 public void CheckJournalexisting(Journals j)
 {
     Assert.False(jp.IsJournalExist(j.jName, driverForJournals));
     //accumulator.Accumulate(() => Assert.True(jp.IsJournalExist(j.jName, driverForJournals)));
     //accumulator.Release();
 }
Beispiel #3
0
 private static TestCaseData CreateTestCaseData(Journals j)
 {
     return(new TestCaseData());
 }