public class TextAssertionsImpl extends Object implements TextAssertions
TextAssertions| Constructor and Description |
|---|
TextAssertionsImpl() |
TextAssertionsImpl(net.sourceforge.jwebunit.WebTester tester) |
| Modifier and Type | Method and Description |
|---|---|
void |
assertAtLeastOneTextPresent(Locator locator,
String option1,
String... moreOptions)
Asserts that at least one of the provided text strings is present in the locator.
|
void |
assertEqualDateStrings(String expected,
String actual) |
void |
assertRegexMatch(Locator locator,
String regexPattern)
Synonym for
TextAssertions.assertRegexMatch(String, String) that calls getText() on the provided
locator. |
void |
assertRegexMatch(String srcText,
String regexPattern)
This asserets that the regular expression pattern 'regexPattern' has at least one match somewhere inside 'srcText'
|
void |
assertRegexNoMatch(Locator locator,
String regexPattern)
Synonym for
TextAssertions.assertRegexNoMatch(String, String) that calls getText() on the provided
locator. |
void |
assertRegexNoMatch(String srcText,
String regexPattern)
This asserets that the regular expression pattern 'regexPattern' has NO match somewhere inside 'srcText'
|
void |
assertTextNotPresent(Locator locator,
String expectedText)
Synonym for
TextAssertions.assertTextNotPresent(String, String) that calls getText() on the provided
locator. |
void |
assertTextNotPresent(String expectedText)
Asserts that the given text cannot be found in the current page.
|
void |
assertTextNotPresent(String srcText,
String expectedText)
Asserts that 'expectedText' can NOT be found in 'srcText'.
|
void |
assertTextPresent(Locator locator,
String expectedText)
Synonym for
TextAssertions.assertTextPresent(String, String) that calls getText() on the provided
locator. |
void |
assertTextPresent(String expectedText)
Asserts that 'expectedText' can be found in the current page.
|
void |
assertTextPresent(String srcText,
String expectedText)
Asserts that 'expectedText' can be found in 'srcText'.
|
void |
assertTextPresentHtmlEncoded(String expectedText)
Asserts that 'expectedText' can be found in the current page in a "HTML Encoded" form.
|
void |
assertTextPresentNumOccurences(Locator locator,
String expectedText,
int numOccurences)
Synonym for
TextAssertions.assertTextPresentNumOccurences(String, String, int) that calls getText() on the provided
locator. |
void |
assertTextPresentNumOccurences(String expectedText,
int numOccurences)
Asserts that 'expectedText' can be found in the current page exactly 'numOccurences' times.
|
void |
assertTextPresentNumOccurences(String srcText,
String subString,
int expectedCount)
Asserts that 'expectedText' can be found in 'srcText' exactly 'numOccurences' times.
|
void |
assertTextSequence(Locator locator,
String[] expectedTextSequence)
Synonym for
TextAssertions.assertTextSequence(String, String[]) that calls getText() on the provided
locator. |
void |
assertTextSequence(Locator locator,
String expected1,
String... expected2)
Synonym for
TextAssertions.assertTextSequence(String, String[]) that calls getText() on the provided
locator. |
void |
assertTextSequence(String srcText,
String[] expectedTextSequence)
Asserts that the text sequence 'expectedTextSequence' can be found in 'srcText'
|
void |
assertTextSequence(String srcText,
String expected1,
String... expected2)
Asserts that the text sequence 'expectedTextSequence' can be found in 'srcText'
|
public TextAssertionsImpl()
@Inject public TextAssertionsImpl(net.sourceforge.jwebunit.WebTester tester)
public void assertTextPresent(String expectedText)
TextAssertionsassertTextPresent in interface TextAssertionsexpectedText - the expected textpublic void assertTextPresentHtmlEncoded(String expectedText)
TextAssertionsThe encoding expects <, >, ", ', and & to be encoded to appropriate HTML encoding.
assertTextPresentHtmlEncoded in interface TextAssertionsexpectedText - the expected textpublic void assertTextNotPresent(String expectedText)
TextAssertionsassertTextNotPresent in interface TextAssertionsexpectedText - the expected textpublic void assertTextPresent(Locator locator, String expectedText)
TextAssertionsTextAssertions.assertTextPresent(String, String) that calls getText() on the provided
locator.
If the provided locator is null the method does the check for the current page instead.assertTextPresent in interface TextAssertionslocator - the source of the textexpectedText - the expected textpublic void assertTextPresent(String srcText, String expectedText)
TextAssertionsassertTextPresent in interface TextAssertionssrcText - the text to search inexpectedText - the expected textpublic void assertTextPresentNumOccurences(String expectedText, int numOccurences)
TextAssertionsassertTextPresentNumOccurences in interface TextAssertionsexpectedText - the expected textnumOccurences - the number of times the expected text should occur; must be greater than 0.public void assertTextPresentNumOccurences(String srcText, String subString, int expectedCount)
TextAssertionsassertTextPresentNumOccurences in interface TextAssertionssrcText - the text to search insubString - the expected textexpectedCount - the number of times the expected text should occur; must be greater than 0.public void assertTextPresentNumOccurences(Locator locator, String expectedText, int numOccurences)
TextAssertionsTextAssertions.assertTextPresentNumOccurences(String, String, int) that calls getText() on the provided
locator.assertTextPresentNumOccurences in interface TextAssertionslocator - the source of the textexpectedText - the expected textnumOccurences - the number of times the expected text should occur; must be greater than 0.public void assertTextNotPresent(String srcText, String expectedText)
TextAssertionsassertTextNotPresent in interface TextAssertionssrcText - the text to search inexpectedText - the expected textpublic void assertTextNotPresent(Locator locator, String expectedText)
TextAssertionsTextAssertions.assertTextNotPresent(String, String) that calls getText() on the provided
locator.assertTextNotPresent in interface TextAssertionslocator - the source of the textexpectedText - the expected textpublic void assertTextSequence(Locator locator, String[] expectedTextSequence)
TextAssertionsTextAssertions.assertTextSequence(String, String[]) that calls getText() on the provided
locator.assertTextSequence in interface TextAssertionslocator - the source of the textexpectedTextSequence - the expected text sequencepublic void assertTextSequence(Locator locator, String expected1, String... expected2)
TextAssertionsTextAssertions.assertTextSequence(String, String[]) that calls getText() on the provided
locator.assertTextSequence in interface TextAssertionslocator - the source of the textexpected1 - the first expected text in the sequenceexpected2 - the rest of expected texts in the sequencepublic void assertAtLeastOneTextPresent(Locator locator, String option1, String... moreOptions)
TextAssertionsAssertionError if none are present.assertAtLeastOneTextPresent in interface TextAssertionslocator - the source of the textoption1 - the expected textmoreOptions - the expected textspublic void assertEqualDateStrings(String expected, String actual)
assertEqualDateStrings in interface TextAssertionspublic void assertTextSequence(String srcText, String expected1, String... expected2)
TextAssertionsassertTextSequence in interface TextAssertionssrcText - the text to search inexpected1 - the first expected text in the sequenceexpected2 - the rest of expected texts in the sequencepublic void assertTextSequence(String srcText, String[] expectedTextSequence)
TextAssertionsassertTextSequence in interface TextAssertionssrcText - the text to search inexpectedTextSequence - the expected text sequencepublic void assertRegexMatch(String srcText, String regexPattern)
TextAssertionsassertRegexMatch in interface TextAssertionssrcText - the text source to do the matching inregexPattern - the regex patternpublic void assertRegexNoMatch(String srcText, String regexPattern)
TextAssertionsassertRegexNoMatch in interface TextAssertionssrcText - the text source to do the matching inregexPattern - the regex patternpublic void assertRegexMatch(Locator locator, String regexPattern)
TextAssertionsTextAssertions.assertRegexMatch(String, String) that calls getText() on the provided
locator.assertRegexMatch in interface TextAssertionslocator - the source of the teextregexPattern - the regex patternpublic void assertRegexNoMatch(Locator locator, String regexPattern)
TextAssertionsTextAssertions.assertRegexNoMatch(String, String) that calls getText() on the provided
locator.assertRegexNoMatch in interface TextAssertionslocator - the source of the teextregexPattern - the regex patternCopyright © 2002-2022 Atlassian. All Rights Reserved.