Exemple #1
0
 public TestLinkCaseWrapper(TestCaseBase wrappedTestCase, String apiKey,
                            String apiUrl, String testPlatformName, String projectName, String testPlanName,
                            String testSuiteName, String testCaseName)
 {
     _apiKey           = apiKey;
     _apiUrl           = apiUrl;
     _projectName      = projectName;
     _testPlanName     = testPlanName;
     _testPlatformName = testPlatformName;
     _testCaseName     = testCaseName;
     _testSuiteName    = testSuiteName;
     _wrappedTestCase  = wrappedTestCase;
 }
Exemple #2
0
        public static void LoginToServer(TestCaseBase testCase)
        {
            String testServer = ConfigurationManager.AppSettings["testServer"];
            string homeUrl    = "http://" + testServer + "/";
            string dstUrl     = "http://" + testServer + "/Search";

            testCase.GoToUrl(homeUrl);
            testCase.FindElementByXPath(@"//*[@id=""Login""]").SendKeys("selenium user");
            testCase.FindElementByXPath(@"//*[@id=""Password""]").SendKeys("poiskit");
            testCase.FindElementByXPath(@"//*[@id=""wrapper""]/div[2]/section/form/div[5]/div/button").Click();
            try
            {
                testCase.WaitBool(() => testCase.GetUrl().Equals(dstUrl), TimeSpan.FromSeconds(5));
            }
            catch (WebDriverTimeoutException exception)
            {
                throw new WebDriverTimeoutException("Не удалось перейти на страницу поиска. " + exception.Message);
            }
        }