@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.
Returns the body text of the current page
|
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, toString
protected 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)
public void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
setUp(String)
public void setUp(String url) throws Exception
url
- the baseUrl to use for your Selenium testsException
setUp(String, String)
public void setUp(String url, String browserString) throws Exception
url
- the baseUrl for your testsbrowserString
- the browser to use, e.g. *firefoxException
public 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
public void tearDown() throws Exception
tearDown
in class junit.framework.TestCase
Exception
public void verifyEquals(boolean arg1, boolean arg2)
public void verifyEquals(Object s1, Object s2)
public void verifyEquals(String[] s1, String[] s2)
public void verifyFalse(boolean b)
public void verifyNotEquals(boolean s1, boolean s2)
public void verifyNotEquals(Object s1, Object s2)
public void verifyTrue(boolean b)
public static void assertEquals(Object s1, Object s2)
public static void assertEquals(String s1, String s2)
public static void assertEquals(String s1, String[] s2)
public static void assertEquals(String[] s1, String[] s2)
public static void assertNotEquals(boolean b1, boolean b2)
public static void assertNotEquals(Object obj1, Object obj2)
public static boolean seleniumEquals(Object expected, Object actual)
seleniumEquals(String, String)
public static boolean seleniumEquals(String expected, String actual)
expected
- actual
- protected boolean isCaptureScreenShotOnFailure()
protected String runtimeBrowserString()
protected void setCaptureScreenShotOnFailure(boolean b)
protected void setTestContext()
public void runBare() throws Throwable
runBare
in class junit.framework.TestCase
Throwable
- if any exception is thrownCopyright © 2015. All rights reserved.