com.atlassian.jira.pageobjects.form
Class FormUtils

java.lang.Object
  extended by com.atlassian.jira.pageobjects.form.FormUtils

public class FormUtils
extends Object

Some utilities for dealing with forms.

Since:
v5.0.1

Constructor Summary
FormUtils()
           
 
Method Summary
static Map<String,String> getAuiFormErrors(com.atlassian.pageobjects.elements.PageElement formElement)
          Return a mapping of the errors currently on the form.
static List<String> getAuiFormGlobalErrors(com.atlassian.pageobjects.elements.PageElement formElement)
          Return the global error on the passed form.
static void setElement(com.atlassian.pageobjects.elements.PageElement element, String value)
          Set the value of an element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormUtils

public FormUtils()
Method Detail

setElement

public static void setElement(com.atlassian.pageobjects.elements.PageElement element,
                              String value)
Set the value of an element. Will do nothing if value is null.

Parameters:
element - the element whose value should be changed.
value - the value to set the element to.

getAuiFormErrors

public static Map<String,String> getAuiFormErrors(com.atlassian.pageobjects.elements.PageElement formElement)
Return a mapping of the errors currently on the form. The mapping if from parameterName -> error.

Parameters:
formElement - the form.
Returns:
a mapping from parameterName -> error of all the errors currently on the form.

getAuiFormGlobalErrors

public static List<String> getAuiFormGlobalErrors(com.atlassian.pageobjects.elements.PageElement formElement)
Return the global error on the passed form. Global errors are not associated with a field.

Parameters:
formElement - the form.
Returns:
a list of global errors stripped of any whitespace.


Copyright © 2002-2012 Atlassian. All Rights Reserved.