@Deprecated
public class SeleneseTestCase
extends junit.framework.TestCase
This class adds a number of "verify" commands, which are like "assert" commands, but they don't stop the test when they fail. Instead, verification errors are all thrown at once during tearDown.
| Modifier and Type | Field and Description |
|---|---|
protected Selenium |
selenium
Deprecated.
Use this object to run all of your selenium tests
|
| Constructor and Description |
|---|
SeleneseTestCase()
Deprecated.
|
SeleneseTestCase(java.lang.String name)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
assertEquals(java.lang.Object s1,
java.lang.Object s2)
Deprecated.
Like JUnit's Assert.assertEquals, but knows how to compare string arrays
|
static void |
assertEquals(java.lang.String[] s1,
java.lang.String[] s2)
Deprecated.
Asserts that two string arrays have identical string contents
|
static void |
assertEquals(java.lang.String s1,
java.lang.String s2)
Deprecated.
Like JUnit's Assert.assertEquals, but handles "regexp:" strings like HTML Selenese
|
static void |
assertEquals(java.lang.String s1,
java.lang.String[] s2)
Deprecated.
Like JUnit's Assert.assertEquals, but joins the string array with commas, and handles "regexp:"
strings like HTML Selenese
|
static void |
assertNotEquals(boolean b1,
boolean b2)
Deprecated.
Asserts that two booleans are not the same
|
static void |
assertNotEquals(java.lang.Object obj1,
java.lang.Object obj2)
Deprecated.
Asserts that two objects are not the same (compares using .equals())
|
void |
checkForVerificationErrors()
Deprecated.
Asserts that there were no verification errors during the current test, failing immediately if
any are found
|
void |
clearVerificationErrors()
Deprecated.
Clears out the list of verification errors
|
java.lang.String |
getText()
Deprecated.
|
protected boolean |
isCaptureScreenShotOnFailure()
Deprecated.
|
java.lang.String |
join(java.lang.String[] array,
char c)
Deprecated.
|
void |
pause(int millisecs)
Deprecated.
Sleeps for the specified number of milliseconds
|
void |
runBare()
Deprecated.
Runs the bare test sequence, capturing a screenshot if a test fails
|
protected java.lang.String |
runtimeBrowserString()
Deprecated.
|
static boolean |
seleniumEquals(java.lang.Object expected,
java.lang.Object actual)
Deprecated.
Compares two objects, but handles "regexp:" strings like HTML Selenese
|
static boolean |
seleniumEquals(java.lang.String expected,
java.lang.String actual)
Deprecated.
Compares two strings, but handles "regexp:" strings like HTML Selenese
|
protected void |
setCaptureScreenShotOnFailure(boolean b)
Deprecated.
|
protected void |
setTestContext()
Deprecated.
|
void |
setUp()
Deprecated.
Calls this.setUp(null)
|
void |
setUp(java.lang.String url)
Deprecated.
Calls this.setUp with the specified url and a default browser.
|
void |
setUp(java.lang.String url,
java.lang.String browserString)
Deprecated.
Creates a new DefaultSelenium object and starts it using the specified baseUrl and browser
string
|
void |
setUp(java.lang.String url,
java.lang.String browserString,
int port)
Deprecated.
Creates a new DefaultSelenium object and starts it using the specified baseURL, browser string
and port
|
void |
tearDown()
Deprecated.
checks for verification errors and stops the browser
|
void |
verifyEquals(boolean arg1,
boolean arg2)
Deprecated.
Like assertEquals, but fails at the end of the test (during tearDown)
|
void |
verifyEquals(java.lang.Object s1,
java.lang.Object s2)
Deprecated.
Like assertEquals, but fails at the end of the test (during tearDown)
|
void |
verifyEquals(java.lang.String[] s1,
java.lang.String[] s2)
Deprecated.
Like assertEquals, but fails at the end of the test (during tearDown)
|
void |
verifyFalse(boolean b)
Deprecated.
Like assertFalse, but fails at the end of the test (during tearDown)
|
void |
verifyNotEquals(boolean s1,
boolean s2)
Deprecated.
Like assertNotEquals, but fails at the end of the test (during tearDown)
|
void |
verifyNotEquals(java.lang.Object s1,
java.lang.Object s2)
Deprecated.
Like assertNotEquals, but fails at the end of the test (during tearDown)
|
void |
verifyTrue(boolean b)
Deprecated.
Like assertTrue, but fails at the end of the test (during tearDown)
|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toStringprotected Selenium selenium
public SeleneseTestCase()
public SeleneseTestCase(java.lang.String name)
public void checkForVerificationErrors()
public void clearVerificationErrors()
public java.lang.String getText()
public void pause(int millisecs)
millisecs - number ofpublic void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.ExceptionsetUp(String)public void setUp(java.lang.String url)
throws java.lang.Exception
url - the baseUrl to use for your Selenium testsjava.lang.Exception - yep, generic ExceptionsetUp(String, String)public void setUp(java.lang.String url,
java.lang.String browserString)
throws java.lang.Exception
url - the baseUrl for your testsbrowserString - the browser to use, e.g. *firefoxjava.lang.Exception - yep, generic Exceptionpublic void setUp(java.lang.String url,
java.lang.String browserString,
int port)
throws java.lang.Exception
url - the baseUrl for your testsbrowserString - the browser to use, e.g. *firefoxport - the port of Selenium RCjava.lang.Exception - yep, generic Exceptionpublic void tearDown()
throws java.lang.Exception
tearDown in class junit.framework.TestCasejava.lang.Exceptionpublic void verifyEquals(boolean arg1,
boolean arg2)
arg1 - to compare to arg2arg2 - to compare to arg1public void verifyEquals(java.lang.Object s1,
java.lang.Object s2)
s1 - to compare to s2s2 - to compare to s1public void verifyEquals(java.lang.String[] s1,
java.lang.String[] s2)
s1 - to compare to s2s2 - to compare to s1public void verifyFalse(boolean b)
b - boolean to check is falsepublic void verifyNotEquals(boolean s1,
boolean s2)
s1 - to compare to s2s2 - to compare to s1public void verifyNotEquals(java.lang.Object s1,
java.lang.Object s2)
s1 - to compare to s2s2 - to compare to s1public void verifyTrue(boolean b)
b - boolean to verify is truepublic static void assertEquals(java.lang.Object s1,
java.lang.Object s2)
s1 - to compare to s2s2 - to compare to s1public static void assertEquals(java.lang.String s1,
java.lang.String s2)
s1 - to compare to s2s2 - to compare to s1public static void assertEquals(java.lang.String s1,
java.lang.String[] s2)
s1 - to compare to s2s2 - to compare to s1public static void assertEquals(java.lang.String[] s1,
java.lang.String[] s2)
s1 - to compare to s2s2 - to compare to s1public static void assertNotEquals(boolean b1,
boolean b2)
b1 - to compare to b2b2 - to compare to b1public static void assertNotEquals(java.lang.Object obj1,
java.lang.Object obj2)
obj1 - to compare to obj2obj2 - to compare to obj1public static boolean seleniumEquals(java.lang.Object expected,
java.lang.Object actual)
expected - expression of expectedactual - expression of actualseleniumEquals(String, String)public static boolean seleniumEquals(java.lang.String expected,
java.lang.String actual)
expected - expression of expectedactual - expression of actualprotected boolean isCaptureScreenShotOnFailure()
protected java.lang.String runtimeBrowserString()
protected void setCaptureScreenShotOnFailure(boolean b)
protected void setTestContext()
public void runBare()
throws java.lang.Throwable
runBare in class junit.framework.TestCasejava.lang.Throwable - if any exception is thrownpublic java.lang.String join(java.lang.String[] array,
char c)