Package org.jenkinsci.test.acceptance
Class Matchers
java.lang.Object
org.jenkinsci.test.acceptance.Matchers
Hamcrest matchers.
- Author:
- Kohsuke Kawaguchi
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncontainsRegexp
(String regexp) containsRegexp
(String regexp, int opts) Matches if a string contains a portion that matches to the regular expression.Matches if a string contains a portion that matches to the regular expression.static org.hamcrest.Matcher<String>
containsString
(String format, Object... args) Matches the specified formatted string.fullNameIs
(String fullName) static Matcher<PageObject>
For asserting that aPageObject
's top page has an action of the given name.static Matcher<org.openqa.selenium.WebDriver>
hasContent
(String content) Asserts that given text is shown on page.static Matcher<org.openqa.selenium.WebDriver>
hasContent
(Pattern pattern) static Matcher<org.openqa.selenium.WebDriver>
hasElement
(org.openqa.selenium.By selector) Matches that matchesWebDriver
when it has an element that matches to the given selector.hasLoggedInUser
(String user) static Matcher<org.openqa.selenium.WebDriver>
isMemberOf
(String group) loggedInAs
(String user) mailAddressIs
(String mail) static Matcher<PageObject>
static Matcher<PageObject>
-
Field Details
-
by
-
-
Constructor Details
-
Matchers
public Matchers()
-
-
Method Details
-
hasContent
Asserts that given text is shown on page. -
hasContent
-
hasElement
Matches that matchesWebDriver
when it has an element that matches to the given selector. -
hasURL
-
hasAction
For asserting that aPageObject
's top page has an action of the given name. -
containsRegexp
-
containsRegexp
Matches if a string contains a portion that matches to the regular expression. -
containsString
Matches the specified formatted string.- Parameters:
format
- A format stringargs
- Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Java™ Virtual Machine Specification. The behaviour on anull
argument depends on the conversion.- Returns:
- the matcher
-
containsRegexp
Matches if a string contains a portion that matches to the regular expression. -
pageObjectExists
-
pageObjectDoesNotExist
-
hasLoggedInUser
-
loggedInAs
-
hasInvalidLoginInformation
-
isMemberOf
-
fullNameIs
-
mailAddressIs
-
existingFile
-