@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 com.thoughtworks.selenium.Selenium |
selenium
Deprecated.
Use this object to run all of your selenium tests
|
| Constructor and Description |
|---|
SeleneseTestCase()
Deprecated.
|
SeleneseTestCase(String name)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
assertEquals(Object s1,
Object s2)
Deprecated.
Like JUnit's Assert.assertEquals, but knows how to compare string arrays
|
static void |
assertEquals(String[] s1,
String[] s2)
Deprecated.
Asserts that two string arrays have identical string contents
|
static void |
assertEquals(String s1,
String s2)
Deprecated.
Like JUnit's Assert.assertEquals, but handles "regexp:" strings like HTML Selenese
|
static void |
assertEquals(String s1,
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(Object obj1,
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
|
String |
getText()
Deprecated.
|
protected boolean |
isCaptureScreenShotOnFailure()
Deprecated.
|
String |
join(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 String |
runtimeBrowserString()
Deprecated.
|
static boolean |
seleniumEquals(Object expected,
Object actual)
Deprecated.
Compares two objects, but handles "regexp:" strings like HTML Selenese
|
static boolean |
seleniumEquals(String expected,
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(String url)
Deprecated.
Calls this.setUp with the specified url and a default browser.
|
void |
setUp(String url,
String browserString)
Deprecated.
Creates a new DefaultSelenium object and starts it using the specified baseUrl and browser
string
|
void |
setUp(String url,
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(Object s1,
Object s2)
Deprecated.
Like assertEquals, but fails at the end of the test (during tearDown)
|
void |
verifyEquals(String[] s1,
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(Object s1,
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 com.thoughtworks.selenium.Selenium selenium
public SeleneseTestCase()
public SeleneseTestCase(String name)
public void checkForVerificationErrors()
public void clearVerificationErrors()
public String getText()
public void pause(int millisecs)
millisecs - number ofpublic void setUp()
throws Exception
setUp in class junit.framework.TestCaseExceptionsetUp(String)public void setUp(String url) throws Exception
url - the baseUrl to use for your Selenium testsException - yep, generic ExceptionsetUp(String, String)public void setUp(String url, String browserString) throws Exception
url - the baseUrl for your testsbrowserString - the browser to use, e.g. *firefoxException - yep, generic Exceptionpublic void setUp(String url, String browserString, int port) throws Exception
url - the baseUrl for your testsbrowserString - the browser to use, e.g. *firefoxport - the port of Selenium RCException - yep, generic Exceptionpublic void tearDown()
throws Exception
tearDown in class junit.framework.TestCaseExceptionpublic void verifyEquals(boolean arg1,
boolean arg2)
arg1 - to compare to arg2arg2 - to compare to arg1public void verifyEquals(Object s1, Object s2)
s1 - to compare to s2s2 - to compare to s1public void verifyEquals(String[] s1, 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(Object s1, Object s2)
s1 - to compare to s2s2 - to compare to s1public void verifyTrue(boolean b)
b - boolean to verify is truepublic static void assertEquals(Object s1, Object s2)
s1 - to compare to s2s2 - to compare to s1public static void assertEquals(String s1, String s2)
s1 - to compare to s2s2 - to compare to s1public static void assertEquals(String s1, String[] s2)
s1 - to compare to s2s2 - to compare to s1public static void assertEquals(String[] s1, 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(Object obj1, Object obj2)
obj1 - to compare to obj2obj2 - to compare to obj1public static boolean seleniumEquals(Object expected, Object actual)
expected - expression of expectedactual - expression of actualseleniumEquals(String, String)public static boolean seleniumEquals(String expected, String actual)
expected - expression of expectedactual - expression of actualprotected boolean isCaptureScreenShotOnFailure()
protected String runtimeBrowserString()
protected void setCaptureScreenShotOnFailure(boolean b)
protected void setTestContext()
public void runBare()
throws Throwable
runBare in class junit.framework.TestCaseThrowable - if any exception is thrownCopyright © 2016. All rights reserved.