public interface TextAssertions
Assertions
Modifier and Type | Method and Description |
---|---|
void |
assertAtLeastOneTextPresent(Locator locator,
String option1,
String... options)
Asserts that at least one of the provided text strings is present in the locator.
|
void |
assertRegexMatch(Locator locator,
String regexPattern)
Synonym for
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
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
assertTextNotPresent(String, String) that calls getText() on the provided
locator. |
void |
assertTextNotPresent(String text)
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
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
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 expectedText,
int numOccurences)
Asserts that 'expectedText' can be found in 'srcText' exactly 'numOccurences' times.
|
void |
assertTextSequence(Locator locator,
String[] expectedTextSequence)
Synonym for
assertTextSequence(String, String[]) that calls getText() on the provided
locator. |
void |
assertTextSequence(Locator locator,
String expected1,
String... expected2)
Synonym for
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'
|
void assertTextPresent(String expectedText)
expectedText
- the expected textvoid assertTextPresentHtmlEncoded(String expectedText)
The encoding expects <, >, ", ', and & to be encoded to appropriate HTML encoding.
expectedText
- the expected textvoid assertTextNotPresent(String text)
text
- the expected textvoid assertTextPresent(String srcText, String expectedText)
srcText
- the text to search inexpectedText
- the expected textvoid assertTextPresent(Locator locator, String expectedText)
assertTextPresent(String, String)
that calls getText() on the provided
locator.locator
- the source of the textexpectedText
- the expected textvoid assertTextPresentNumOccurences(String expectedText, int numOccurences)
expectedText
- the expected textnumOccurences
- the number of times the expected text should occur; must be greater than 0.void assertTextPresentNumOccurences(String srcText, String expectedText, int numOccurences)
srcText
- the text to search inexpectedText
- the expected textnumOccurences
- the number of times the expected text should occur; must be greater than 0.void assertTextPresentNumOccurences(Locator locator, String expectedText, int numOccurences)
assertTextPresentNumOccurences(String, String, int)
that calls getText() on the provided
locator.locator
- the source of the textexpectedText
- the expected textnumOccurences
- the number of times the expected text should occur; must be greater than 0.void assertRegexMatch(String srcText, String regexPattern)
srcText
- the text source to do the matching inregexPattern
- the regex patternvoid assertRegexNoMatch(String srcText, String regexPattern)
srcText
- the text source to do the matching inregexPattern
- the regex patternvoid assertRegexMatch(Locator locator, String regexPattern)
assertRegexMatch(String, String)
that calls getText() on the provided
locator.locator
- the source of the teextregexPattern
- the regex patternvoid assertRegexNoMatch(Locator locator, String regexPattern)
assertRegexNoMatch(String, String)
that calls getText() on the provided
locator.locator
- the source of the teextregexPattern
- the regex patternvoid assertTextNotPresent(String srcText, String expectedText)
srcText
- the text to search inexpectedText
- the expected textvoid assertTextNotPresent(Locator locator, String expectedText)
assertTextNotPresent(String, String)
that calls getText() on the provided
locator.locator
- the source of the textexpectedText
- the expected textvoid assertTextSequence(String srcText, String[] expectedTextSequence)
srcText
- the text to search inexpectedTextSequence
- the expected text sequencevoid assertTextSequence(String srcText, String expected1, String... expected2)
srcText
- the text to search inexpected1
- the first expected text in the sequenceexpected2
- the rest of expected texts in the sequencevoid assertTextSequence(Locator locator, String[] expectedTextSequence)
assertTextSequence(String, String[])
that calls getText() on the provided
locator.locator
- the source of the textexpectedTextSequence
- the expected text sequencevoid assertTextSequence(Locator locator, String expected1, String... expected2)
assertTextSequence(String, String[])
that calls getText() on the provided
locator.locator
- the source of the textexpected1
- the first expected text in the sequenceexpected2
- the rest of expected texts in the sequencevoid assertAtLeastOneTextPresent(Locator locator, String option1, String... options)
AssertionFailedError
if none are present.locator
- the source of the textoption1
- the expected textoptions
- the expected textsCopyright © 2002-2016 Atlassian. All Rights Reserved.