Verifies that the specified page does not contain the specified text. @param page the page to check @param text the text to check for @throws AssertionError if the page contains the specified text @throws NullPointerException if page or text is null
(final HtmlPage page, final String text)
| 227 | * @throws NullPointerException if page or text is null |
| 228 | */ |
| 229 | public static void assertTextNotPresent(final HtmlPage page, final String text) { |
| 230 | if (page.asNormalizedText().contains(text)) { |
| 231 | final String msg = "Found unexpected text '" + text + "' on the page."; |
| 232 | throw new AssertionError(msg); |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | /** |
| 237 | * Verifies that the element on the specified page which matches the specified ID does not |