aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java32
1 files changed, 21 insertions, 11 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index 654d84835..508889372 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -67,15 +67,25 @@ public abstract class AbstractSeleniumTest
public void open( String baseUrl, String browser, String seleniumHost, int seleniumPort, String maxWaitTimeInMs )
throws Exception
{
- AbstractSeleniumTest.baseUrl = baseUrl;
- AbstractSeleniumTest.maxWaitTimeInMs = maxWaitTimeInMs;
+ try
+ {
+ AbstractSeleniumTest.baseUrl = baseUrl;
+ AbstractSeleniumTest.maxWaitTimeInMs = maxWaitTimeInMs;
- if ( getSelenium() == null )
+ if ( getSelenium() == null )
+ {
+ DefaultSelenium s =
+ new DefaultSelenium( seleniumHost, seleniumPort, browser, baseUrl + "?" + forceLocaleParam );
+ s.start();
+ s.setTimeout( maxWaitTimeInMs );
+ selenium.set( s );
+ }
+ }
+ catch ( Exception e )
{
- DefaultSelenium s = new DefaultSelenium( seleniumHost, seleniumPort, browser, baseUrl + "?" + forceLocaleParam );
- s.start();
- s.setTimeout( maxWaitTimeInMs );
- selenium.set( s );
+ // yes
+ System.out.print( e.getMessage() );
+ e.printStackTrace();
}
}
@@ -405,14 +415,14 @@ public abstract class AbstractSeleniumTest
Assert.assertFalse( getSelenium().isChecked( locator ) );
}
- public void assertXpathCount(String locator, int expectedCount)
+ public void assertXpathCount( String locator, int expectedCount )
{
- Assert.assertEquals( getSelenium().getXpathCount(locator).intValue(), expectedCount );
+ Assert.assertEquals( getSelenium().getXpathCount( locator ).intValue(), expectedCount );
}
- public void assertElementValue(String locator, String expectedValue)
+ public void assertElementValue( String locator, String expectedValue )
{
- Assert.assertEquals(getSelenium().getValue(locator), expectedValue);
+ Assert.assertEquals( getSelenium().getValue( locator ), expectedValue );
}
} \ No newline at end of file