public class TextAssertionsImpl extends AbstractFuncTestUtil implements TextAssertions, com.atlassian.jira.testkit.client.log.FuncTestLogger
TextAssertions
environmentData, FS, locators, logger, logIndentLevel
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 |
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'
|
childLogIndentLevel, getAssertions, getEnvironmentData, getFuncTestHelperFactory, getLogger, log, log, navigation, submitAtPage
public TextAssertionsImpl()
public TextAssertionsImpl(net.sourceforge.jwebunit.WebTester tester)
public void assertTextPresent(String expectedText)
TextAssertions
assertTextPresent
in interface TextAssertions
expectedText
- the expected textpublic void assertTextPresentHtmlEncoded(String expectedText)
TextAssertions
The encoding expects <, >, ", ', and & to be encoded to appropriate HTML encoding.
assertTextPresentHtmlEncoded
in interface TextAssertions
expectedText
- the expected textpublic void assertTextNotPresent(String expectedText)
TextAssertions
assertTextNotPresent
in interface TextAssertions
expectedText
- the expected textpublic void assertTextPresent(Locator locator, String expectedText)
TextAssertions
TextAssertions.assertTextPresent(String,String)
that calls getText() on the provided
locator.assertTextPresent
in interface TextAssertions
locator
- the source of the textexpectedText
- the expected textpublic void assertTextPresent(String srcText, String expectedText)
TextAssertions
assertTextPresent
in interface TextAssertions
srcText
- the text to search inexpectedText
- the expected textpublic void assertTextPresentNumOccurences(String expectedText, int numOccurences)
TextAssertions
assertTextPresentNumOccurences
in interface TextAssertions
expectedText
- 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)
TextAssertions
assertTextPresentNumOccurences
in interface TextAssertions
srcText
- 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)
TextAssertions
TextAssertions.assertTextPresentNumOccurences(String,String,int)
that calls getText() on the provided
locator.assertTextPresentNumOccurences
in interface TextAssertions
locator
- 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)
TextAssertions
assertTextNotPresent
in interface TextAssertions
srcText
- the text to search inexpectedText
- the expected textpublic void assertTextNotPresent(Locator locator, String expectedText)
TextAssertions
TextAssertions.assertTextNotPresent(String,String)
that calls getText() on the provided
locator.assertTextNotPresent
in interface TextAssertions
locator
- the source of the textexpectedText
- the expected textpublic void assertTextSequence(Locator locator, String[] expectedTextSequence)
TextAssertions
TextAssertions.assertTextSequence(String,String[])
that calls getText() on the provided
locator.assertTextSequence
in interface TextAssertions
locator
- the source of the textexpectedTextSequence
- the expected text sequencepublic void assertTextSequence(Locator locator, String expected1, String... expected2)
TextAssertions
TextAssertions.assertTextSequence(String,String[])
that calls getText() on the provided
locator.assertTextSequence
in interface TextAssertions
locator
- 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)
TextAssertions
AssertionFailedError
if none are present.assertAtLeastOneTextPresent
in interface TextAssertions
locator
- the source of the textoption1
- the expected textmoreOptions
- the expected textspublic void assertTextSequence(String srcText, String expected1, String... expected2)
TextAssertions
assertTextSequence
in interface TextAssertions
srcText
- 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)
TextAssertions
assertTextSequence
in interface TextAssertions
srcText
- the text to search inexpectedTextSequence
- the expected text sequencepublic void assertRegexMatch(String srcText, String regexPattern)
TextAssertions
assertRegexMatch
in interface TextAssertions
srcText
- the text source to do the matching inregexPattern
- the regex patternpublic void assertRegexNoMatch(String srcText, String regexPattern)
TextAssertions
assertRegexNoMatch
in interface TextAssertions
srcText
- the text source to do the matching inregexPattern
- the regex patternpublic void assertRegexMatch(Locator locator, String regexPattern)
TextAssertions
TextAssertions.assertRegexMatch(String,String)
that calls getText() on the provided
locator.assertRegexMatch
in interface TextAssertions
locator
- the source of the teextregexPattern
- the regex patternpublic void assertRegexNoMatch(Locator locator, String regexPattern)
TextAssertions
TextAssertions.assertRegexNoMatch(String,String)
that calls getText() on the provided
locator.assertRegexNoMatch
in interface TextAssertions
locator
- the source of the teextregexPattern
- the regex patternCopyright © 2002-2016 Atlassian. All Rights Reserved.