Пример #1
0
 @Override
 protected void starting(Description description) {
   // Before each test method, ensure a new session is created.
   String webAppUrl = SeleniumUtil.getWebAppUrl();
   if (description.getTestClass().isAnnotationPresent(UrlParams.class)) {
     String urlParams = description.getTestClass().getAnnotation(UrlParams.class).value();
     if (!StringUtility.isNullOrEmpty(urlParams)) {
       webAppUrl = webAppUrl + "?" + urlParams;
     }
   }
   m_driver.get(webAppUrl);
 }
Пример #2
0
 @Override
 protected void finished(Description description) {
   // After each test-method, call the logout URL to destroy the current session
   // (without creating a new one automatically)
   m_driver.get(SeleniumUtil.getLogoutUrl());
 }