public class SeleneseTestNgHelper extends SeleneseTestBase
selenium, verificationErrors
Constructor and Description |
---|
SeleneseTestNgHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
assertEquals(Object actual,
Object expected) |
static void |
assertEquals(String[] actual,
String[] expected) |
static void |
assertEquals(String actual,
String expected) |
static void |
assertEquals(String actual,
String[] expected) |
void |
attachScreenshotListener(String host,
String port,
org.testng.ITestContext context) |
void |
checkForVerificationErrors()
Asserts that there were no verification errors during the current test, failing immediately if
any are found
|
void |
getSelenium(boolean restartSession) |
void |
selectDefaultWindow() |
static boolean |
seleniumEquals(Object actual,
Object expected) |
static boolean |
seleniumEquals(String actual,
String expected) |
void |
setTestContext(Method method) |
void |
setUp(String url,
String browserString)
Creates a new DefaultSelenium object and starts it using the specified baseUrl and browser
string.
|
void |
tearDown()
checks for verification errors and stops the browser
|
void |
verifyEquals(Object actual,
Object expected)
Like assertEquals, but fails at the end of the test (during tearDown)
|
void |
verifyEquals(String[] actual,
String[] expected)
Asserts that two string arrays have identical string contents (fails at the end of the test,
during tearDown)
|
assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertTrue, assertTrue, clearVerificationErrors, fail, getDefaultPort, getText, isCaptureScreenShotOnFailure, join, pause, runtimeBrowserString, setCaptureScreenShotOnFailure, setUp, setUp, setUp, verifyEquals, verifyFalse, verifyNotEquals, verifyNotEquals, verifyTrue
public void setUp(String url, String browserString) throws Exception
SeleneseTestBase
setUp
in class SeleneseTestBase
url
- the baseUrl for your testsbrowserString
- the browser to use, e.g. *firefoxException
- throws them all!SeleneseTestBase.setUp(String, String, int)
public void getSelenium(boolean restartSession)
public void setTestContext(Method method)
public void attachScreenshotListener(String host, String port, org.testng.ITestContext context)
public void checkForVerificationErrors()
SeleneseTestBase
checkForVerificationErrors
in class SeleneseTestBase
public void selectDefaultWindow()
public void tearDown() throws Exception
SeleneseTestBase
tearDown
in class SeleneseTestBase
Exception
- actually, just AssertionError, but someone was lazy?public void verifyEquals(Object actual, Object expected)
SeleneseTestBase
verifyEquals
in class SeleneseTestBase
actual
- object that you want to compare to actualexpected
- the actual object expectedpublic void verifyEquals(String[] actual, String[] expected)
SeleneseTestBase
verifyEquals
in class SeleneseTestBase
actual
- object that you want to compare to actualexpected
- the actual object expectedCopyright © 2016. All rights reserved.