Java Doc for WebAssert.java in  » Testing » htmlunit » com » gargoylesoftware » htmlunit » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » htmlunit » com.gargoylesoftware.htmlunit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.gargoylesoftware.htmlunit.WebAssert

WebAssert
final public class WebAssert (Code)
Utility class which contains standard assertions for HTML pages.
version:
   $Revision: 2132 $
author:
   Daniel Gredler




Method Summary
public static  voidassertAllAccessKeyAttributesUnique(HtmlPage page)
     Many HTML components can have an accesskey attribute which defines a hot key for keyboard navigation.
public static  voidassertAllIdAttributesUnique(HtmlPage page)
     Verifies that all element IDs in the specified page are unique.
public static  voidassertAllTabIndexAttributesSet(HtmlPage page)
    

Many HTML elements are "tabbable" and can have a tabindex attribute that determines the order in which the components are navigated when pressing the tab key.

public static  voidassertElementNotPresent(HtmlPage page, String id)
     Verifies that the specified page does not contain an element with the specified ID.
public static  voidassertElementNotPresentByXPath(HtmlPage page, String xpath)
     Verifies that the specified page does not contain an element matching the specified XPath expression.
public static  voidassertElementPresent(HtmlPage page, String id)
     Verifies that the specified page contains an element with the specified ID.
public static  voidassertElementPresentByXPath(HtmlPage page, String xpath)
     Verifies that the specified page contains an element matching the specified XPath expression.
public static  voidassertFormNotPresent(HtmlPage page, String name)
     Verifies that the specified page does not contain a form with the specified name.
public static  voidassertFormPresent(HtmlPage page, String name)
     Verifies that the specified page contains a form with the specified name.
public static  voidassertInputContainsValue(HtmlPage page, String name, String value)
     Verifies that the input element with the specified name on the specified page contains the specified value.
public static  voidassertInputDoesNotContainValue(HtmlPage page, String name, String value)
     Verifies that the input element with the specified name on the specified page does not contain the specified value.
public static  voidassertInputNotPresent(HtmlPage page, String name)
     Verifies that the specified page does not contain an input element with the specified name.
public static  voidassertInputPresent(HtmlPage page, String name)
     Verifies that the specified page contains an input element with the specified name.
public static  voidassertLinkNotPresent(HtmlPage page, String id)
     Verifies that the specified page does not contain a link with the specified ID.
public static  voidassertLinkNotPresentWithText(HtmlPage page, String text)
     Verifies that the specified page does not contain a link with the specified text.
public static  voidassertLinkPresent(HtmlPage page, String id)
     Verifies that the specified page contains a link with the specified ID.
public static  voidassertLinkPresentWithText(HtmlPage page, String text)
     Verifies that the specified page contains a link with the specified text.
public static  voidassertTextNotPresent(HtmlPage page, String text)
     Verifies that the specified page does not contain the specified text.
public static  voidassertTextNotPresentInElement(HtmlPage page, String text, String id)
     Verifies that the element on the specified page which matches the specified ID does not contain the specified text.
public static  voidassertTextPresent(HtmlPage page, String text)
     Verifies that the specified page contains the specified text.
public static  voidassertTextPresentInElement(HtmlPage page, String text, String id)
     Verifies that the element on the specified page which matches the specified ID contains the specified text.
public static  voidassertTitleContains(HtmlPage page, String titlePortion)
     Verifies that the specified page's title contains the specified substring.
public static  voidassertTitleEquals(HtmlPage page, String title)
     Verifies that the specified page's title equals the specified expected title.
public static  voidassertTitleMatches(HtmlPage page, String regex)
     Verifies that the specified page's title matches the specified regular expression.



Method Detail
assertAllAccessKeyAttributesUnique
public static void assertAllAccessKeyAttributesUnique(HtmlPage page)(Code)
Many HTML components can have an accesskey attribute which defines a hot key for keyboard navigation. This method verifies that all the accesskey attributes on the specified page are unique.
Parameters:
  page - the page to check



assertAllIdAttributesUnique
public static void assertAllIdAttributesUnique(HtmlPage page)(Code)
Verifies that all element IDs in the specified page are unique.
Parameters:
  page - the page to check



assertAllTabIndexAttributesSet
public static void assertAllTabIndexAttributesSet(HtmlPage page)(Code)

Many HTML elements are "tabbable" and can have a tabindex attribute that determines the order in which the components are navigated when pressing the tab key. To ensure good usability for keyboard navigation, all tabbable elements should have the tabindex attribute set.

This method verifies that all tabbable elements have a valid value set for the tabindex attribute.


Parameters:
  page - the page to check



assertElementNotPresent
public static void assertElementNotPresent(HtmlPage page, String id)(Code)
Verifies that the specified page does not contain an element with the specified ID.
Parameters:
  page - the page to check
Parameters:
  id - the ID of an element which expected to not exist on the page



assertElementNotPresentByXPath
public static void assertElementNotPresentByXPath(HtmlPage page, String xpath)(Code)
Verifies that the specified page does not contain an element matching the specified XPath expression.
Parameters:
  page - the page to check
Parameters:
  xpath - the XPath expression which is expected to not match an element in the page



assertElementPresent
public static void assertElementPresent(HtmlPage page, String id)(Code)
Verifies that the specified page contains an element with the specified ID.
Parameters:
  page - the page to check
Parameters:
  id - the expected ID of an element in the page



assertElementPresentByXPath
public static void assertElementPresentByXPath(HtmlPage page, String xpath)(Code)
Verifies that the specified page contains an element matching the specified XPath expression.
Parameters:
  page - the page to check
Parameters:
  xpath - the XPath expression which is expected to match an element in the page



assertFormNotPresent
public static void assertFormNotPresent(HtmlPage page, String name)(Code)
Verifies that the specified page does not contain a form with the specified name.
Parameters:
  page - the page to check
Parameters:
  name - the name of a form which should not exist on the page



assertFormPresent
public static void assertFormPresent(HtmlPage page, String name)(Code)
Verifies that the specified page contains a form with the specified name.
Parameters:
  page - the page to check
Parameters:
  name - the expected name of a form on the page



assertInputContainsValue
public static void assertInputContainsValue(HtmlPage page, String name, String value)(Code)
Verifies that the input element with the specified name on the specified page contains the specified value.
Parameters:
  page - the page to check
Parameters:
  name - the name of the input element to check
Parameters:
  value - the value to check for



assertInputDoesNotContainValue
public static void assertInputDoesNotContainValue(HtmlPage page, String name, String value)(Code)
Verifies that the input element with the specified name on the specified page does not contain the specified value.
Parameters:
  page - the page to check
Parameters:
  name - the name of the input element to check
Parameters:
  value - the value to check for



assertInputNotPresent
public static void assertInputNotPresent(HtmlPage page, String name)(Code)
Verifies that the specified page does not contain an input element with the specified name.
Parameters:
  page - the page to check
Parameters:
  name - the name of the input element to look for



assertInputPresent
public static void assertInputPresent(HtmlPage page, String name)(Code)
Verifies that the specified page contains an input element with the specified name.
Parameters:
  page - the page to check
Parameters:
  name - the name of the input element to look for



assertLinkNotPresent
public static void assertLinkNotPresent(HtmlPage page, String id)(Code)
Verifies that the specified page does not contain a link with the specified ID.
Parameters:
  page - the page to check
Parameters:
  id - the ID of the link which the page is expected to not contain



assertLinkNotPresentWithText
public static void assertLinkNotPresentWithText(HtmlPage page, String text)(Code)
Verifies that the specified page does not contain a link with the specified text. The specified text may be a substring of the entire text contained by the link.
Parameters:
  page - the page to check
Parameters:
  text - the text which a link in the specified page is not expected to contain



assertLinkPresent
public static void assertLinkPresent(HtmlPage page, String id)(Code)
Verifies that the specified page contains a link with the specified ID.
Parameters:
  page - the page to check
Parameters:
  id - the ID of the link which the page is expected to contain



assertLinkPresentWithText
public static void assertLinkPresentWithText(HtmlPage page, String text)(Code)
Verifies that the specified page contains a link with the specified text. The specified text may be a substring of the entire text contained by the link.
Parameters:
  page - the page to check
Parameters:
  text - the text which a link in the specified page is expected to contain



assertTextNotPresent
public static void assertTextNotPresent(HtmlPage page, String text)(Code)
Verifies that the specified page does not contain the specified text.
Parameters:
  page - the page to check
Parameters:
  text - the text to check for



assertTextNotPresentInElement
public static void assertTextNotPresentInElement(HtmlPage page, String text, String id)(Code)
Verifies that the element on the specified page which matches the specified ID does not contain the specified text.
Parameters:
  page - the page to check
Parameters:
  text - the text to check for
Parameters:
  id - the ID of the element which is expected to not contain the specified text



assertTextPresent
public static void assertTextPresent(HtmlPage page, String text)(Code)
Verifies that the specified page contains the specified text.
Parameters:
  page - the page to check
Parameters:
  text - the text to check for



assertTextPresentInElement
public static void assertTextPresentInElement(HtmlPage page, String text, String id)(Code)
Verifies that the element on the specified page which matches the specified ID contains the specified text.
Parameters:
  page - the page to check
Parameters:
  text - the text to check for
Parameters:
  id - the ID of the element which is expected to contain the specified text



assertTitleContains
public static void assertTitleContains(HtmlPage page, String titlePortion)(Code)
Verifies that the specified page's title contains the specified substring.
Parameters:
  page - the page to check
Parameters:
  titlePortion - the substring which the page title is expected to contain



assertTitleEquals
public static void assertTitleEquals(HtmlPage page, String title)(Code)
Verifies that the specified page's title equals the specified expected title.
Parameters:
  page - the page to check
Parameters:
  title - the expected title



assertTitleMatches
public static void assertTitleMatches(HtmlPage page, String regex)(Code)
Verifies that the specified page's title matches the specified regular expression.
Parameters:
  page - the page to check
Parameters:
  regex - the regular expression that the page title is expected to match



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.