Class FormDialog
java.lang.Object
com.atlassian.jira.pageobjects.dialogs.JiraDialog
com.atlassian.jira.pageobjects.dialogs.FormDialog
- Direct Known Subclasses:
AbstractAddWorkflowToSchemeDialog,AbstractAssignIssueTypesDialog,AbstractIssueDialog,AddFieldConfigurationDialog,AddFieldConfigurationSchemeDialog,AddFieldScreenDialog,AddFieldScreenSchemeDialog,AddIssueTypeDialog,AddIssueTypeScreenSchemeDialog,AddIssueTypeToFieldConfigurationDialog,AddIssueTypeToScreenSchemeAssociationDialog,AddNewIssueTypeToSchemeDialog,AddPriorityDialog,AddProjectWizardPage,AddSubtaskTypeDialog,AddWorkflowDialog,ArchiveIssueDialog,AssignIssueDialog,AssociateIssueOperationToScreenDialog,AvatarDialog,CloneIssueDialog,CloseIssueDialog,CommentDialog,CopyWorkflowDialog,DeleteAttachmentDialog,DeleteIssueDialog,DeleteTabDialog,DeleteWorkflowDialog,DiscardDraftDialog,DiscardDraftWorkflowSchemeDialog,EditAttachmentsSettingsDialog,EditCommentDialog,EditProjectDialog,EditWorkflowNameAndDescriptionDialog,ExportRecordsDialog,ImportWorkflowDialog,JiraSudoFormDialog,LabelsDialog,LinkIssueDialog,LogWorkDialog,PrioritySchemesDialog,ProjectIntroVideoDialog,PublishDialog,ReplicationSettingsPage.ReplicationSettingsDialog,ResolveIssueDialog,RestoreIssueDialog,SettingsDialog,ViewWorkflowDesignerDialog,ViewWorkflowTextDialog,WorkflowTransitionDialog,XsrfDialog
Represents a JIRA from dialog. These type of Dialogs basically slurp HTML from the server and display it on the
client side. Input is submitted to a back end action. This action will either indicate that the action was a
success or will return HTML with errors in it for display to the user.
- Since:
- v4.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AUIBlanketprotected com.atlassian.pageobjects.elements.PageElementstatic final Stringprotected com.atlassian.pageobjects.elements.PageElementprotected com.atlassian.pageobjects.elements.PageElementprotected FormMessagesFields inherited from class com.atlassian.jira.pageobjects.dialogs.JiraDialog
binder, CONTENT_AREA_CLASS, CONTENT_READY_CLASS, DIALOG_CLASS, DIALOG_OPEN_CLASS, driver, extendedFinder, HEADING_AREA_CLASS, id, javascriptExecutor, locator, queryFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAccept a dirty form warning in an alert (if there is one)protected voidprotected voidvoidclose()Close the dialog by clicking on the kindly ever-present cancel button.voidClose the dialog by clicking on the cancel button, not dismissing any dirty form warnings.voidescape()Closes the dialog by hitting ESCcom.atlassian.pageobjects.elements.query.TimedQuery<Iterable<com.atlassian.pageobjects.elements.PageElement>>Return a list of the form errors currently on the dialog.Return a mapping of the errors currently on the form.com.atlassian.pageobjects.elements.query.TimedQuery<String>getTitle()booleanReturn true iff the dialog has error messages contained in its associated form.final voidmessages()final voidready()Called when the dialog is first displayed.protected static voidsetElement(com.atlassian.pageobjects.elements.PageElement element, String value) voidprotected booleansubmit(com.atlassian.pageobjects.elements.PageElement pageElement) Do a submit on the passed element.booleanDo a submit on the passed the form element with the passed name.protected booleansubmit(org.openqa.selenium.By locator) Do a submit on the passed element found using the passed locator.Waits for at least one error to be visibleprotected voidprotected voidprotected voidMethods inherited from class com.atlassian.jira.pageobjects.dialogs.JiraDialog
find, find, findAll, findAll, getDialogElement, isClosed, isInDOM, isOpen, waitUntilFinishedLoading
-
Field Details
-
FORM_SUBMITTING_CLASS
- See Also:
-
loading
protected com.atlassian.pageobjects.elements.PageElement loading -
form
protected com.atlassian.pageobjects.elements.PageElement form -
header
protected com.atlassian.pageobjects.elements.PageElement header -
auiBlanket
-
messages
-
-
Constructor Details
-
FormDialog
-
FormDialog
public FormDialog()
-
-
Method Details
-
ready
public final void ready()Called when the dialog is first displayed. Waits util the dialog is ready to work with before exiting. -
initAbstractDialog
public final void initAbstractDialog()- Overrides:
initAbstractDialogin classJiraDialog
-
getAuiMessage
-
submit
protected boolean submit(com.atlassian.pageobjects.elements.PageElement pageElement) Do a submit on the passed element. The method will then wait for the response from the server before returning.- Parameters:
pageElement- the page element to submit.- Returns:
- true if the dialog is still open.
-
submit
protected boolean submit(org.openqa.selenium.By locator) Do a submit on the passed element found using the passed locator. The method will then wait for the response from the server before returning.- Parameters:
locator- for the element to select.- Returns:
- true if the dialog is still open.
-
submit
Do a submit on the passed the form element with the passed name. The method will then wait for the response from the server before returning.- Parameters:
name- the name of the element to submit.- Returns:
- true if the dialog is still open.
-
escape
public void escape()Closes the dialog by hitting ESC -
close
public void close()Close the dialog by clicking on the kindly ever-present cancel button. -
closeNoWait
public void closeNoWait()Close the dialog by clicking on the cancel button, not dismissing any dirty form warnings. -
acceptDirtyFormWarning
public boolean acceptDirtyFormWarning()Accept a dirty form warning in an alert (if there is one)- Returns:
- false if no dirty form warning was shown, true otherwise
-
messages
-
hasFormErrors
public boolean hasFormErrors()Return true iff the dialog has error messages contained in its associated form.- Returns:
- true iff the dialog has error messages contained in its associated form.
-
getFormErrorList
Return a list of the form errors currently on the dialog.- Returns:
- a list of form errors currently on the dialog.
-
waitForFormErrors
Waits for at least one error to be visible- Returns:
- this
-
getFormErrors
Return a mapping of the errors currently on the form. The mapping if from parameterName -> error.- Returns:
- a mapping from parameterName -> error of all the errors currently on the form.
-
getFormErrorElements
public com.atlassian.pageobjects.elements.query.TimedQuery<Iterable<com.atlassian.pageobjects.elements.PageElement>> getFormErrorElements() -
getTitle
-
getTimedTitle
-
assertDialogOpen
protected void assertDialogOpen() -
assertDialogClosed
protected void assertDialogClosed() -
waitWhileSubmitting
protected void waitWhileSubmitting() -
waitUntilClosed
protected void waitUntilClosed() -
waitUntilHidden
protected void waitUntilHidden() -
getFields
-
setField
-
setElement
protected static void setElement(com.atlassian.pageobjects.elements.PageElement element, String value)
-