public class ViewAttachmentsBean extends Object
Modifier and Type | Field and Description |
---|---|
static String |
VIEW_ATTACHMENTS_LINK_ID |
Modifier and Type | Method and Description |
---|---|
void |
attachFile(String filename,
String content) |
void |
attachFile(String filename,
String content,
String comment) |
void |
attachFileFromPath(String path,
String comment) |
boolean |
canRemove(String attachmentFilename)
Returns true if the 'Remove' link is present for the given attachment name.
|
boolean |
canRemoveVersion(String attachmentFilename,
int version)
Returns true if the 'Remove' link is present for the given attachment name and version.
|
int |
countVersions(String attachmentFilename) |
static String |
createAttachmentScopedCssSelector(String attachmentFilename) |
static String |
createCssSelector(String attachmentFilename,
int version) |
static String |
createVersionCssSelector(String attachmentFilename) |
void |
downloadAll()
Clicks the 'Download All' link on the view attachments page.
|
void |
downloadAttachment(String name) |
EditAttachmentsBean |
edit(String attachmentFilename)
Goes to the edit screen of the given attachment.
|
String |
getComment(String attachmentFilename) |
String |
getCreator(String attachmentFilename) |
String |
getEditXPath(String attachmentFilename) |
int |
getNumberOfAttachments() |
String |
getRemoveXPath(String attachmentFilename) |
String |
getVersionComment(String attachmentFilename,
int version) |
String |
getVersionCreator(String attachmentFilename,
int version) |
static String |
getViewAttachmentsPageTitle(Page page) |
boolean |
hasAttachment(String attachmentName) |
boolean |
hasVersion(String attachmentFilename,
int version) |
PaginationBean |
pages() |
void |
remove(String attachmentFilename)
Clicks the 'Remove' link on the view attachments page.
|
RemoveAttachmentBean |
removeAttachments(long pageId,
String attachmentFilename) |
RemoveAttachmentVersionBean |
removeAttachmentsVersion(long pageId,
String attachmentFilename,
int version) |
void |
removeVersion(String attachmentFilename,
int version) |
void |
renameAttachment(String attachmentName,
String newAttachmentName) |
static ViewAttachmentsBean |
viewAttachments()
Factory method to return a ViewAttachmentsBean from the current location of the web tester, by clicking on the
'Attachments' link on the page.
|
static ViewAttachmentsBean |
viewAttachments(long pageId) |
static ViewAttachmentsBean |
viewAttachments(long pageId,
net.sourceforge.jwebunit.junit.WebTester tester) |
static ViewAttachmentsBean |
viewAttachments(Page page) |
static ViewAttachmentsBean |
viewAttachments(Page page,
net.sourceforge.jwebunit.junit.WebTester tester) |
static ViewAttachmentsBean |
viewAttachments(net.sourceforge.jwebunit.junit.WebTester tester) |
static ViewAttachmentsBean |
viewAttachmentsAndHighlight(Page page,
String highlight) |
static ViewAttachmentsBean |
viewAttachmentsAndHighlight(Page page,
String highlight,
net.sourceforge.jwebunit.junit.WebTester tester) |
static ViewAttachmentsBean |
viewAttachmentsByKeyAndTitle(Page page) |
static ViewAttachmentsBean |
viewAttachmentsByKeyAndTitle(Page page,
net.sourceforge.jwebunit.junit.WebTester tester1) |
public static final String VIEW_ATTACHMENTS_LINK_ID
public static ViewAttachmentsBean viewAttachments()
public static ViewAttachmentsBean viewAttachments(net.sourceforge.jwebunit.junit.WebTester tester)
public static ViewAttachmentsBean viewAttachments(long pageId)
public RemoveAttachmentBean removeAttachments(long pageId, String attachmentFilename)
public RemoveAttachmentVersionBean removeAttachmentsVersion(long pageId, String attachmentFilename, int version)
public static ViewAttachmentsBean viewAttachments(long pageId, net.sourceforge.jwebunit.junit.WebTester tester)
public static ViewAttachmentsBean viewAttachmentsByKeyAndTitle(Page page)
public static ViewAttachmentsBean viewAttachmentsByKeyAndTitle(Page page, net.sourceforge.jwebunit.junit.WebTester tester1)
public static ViewAttachmentsBean viewAttachments(Page page)
public static ViewAttachmentsBean viewAttachments(Page page, net.sourceforge.jwebunit.junit.WebTester tester)
public static ViewAttachmentsBean viewAttachmentsAndHighlight(Page page, String highlight)
public static ViewAttachmentsBean viewAttachmentsAndHighlight(Page page, String highlight, net.sourceforge.jwebunit.junit.WebTester tester)
public void downloadAll()
This method does not check if the link is present. (The link is not present when there is only one attachment).
public void downloadAttachment(String name)
public EditAttachmentsBean edit(String attachmentFilename)
This method should really return a EditAttachmentsBean, but it has not been implemented yet.
attachmentFilename
- filename of the attachment to editpublic void remove(String attachmentFilename)
attachmentFilename
- filename of the attachment to removepublic boolean canRemove(String attachmentFilename)
public void removeVersion(String attachmentFilename, int version)
public boolean canRemoveVersion(String attachmentFilename, int version)
public int getNumberOfAttachments()
public int countVersions(String attachmentFilename)
public static String createAttachmentScopedCssSelector(String attachmentFilename)
public boolean hasVersion(String attachmentFilename, int version)
public boolean hasAttachment(String attachmentName)
public PaginationBean pages()
Copyright © 2003–2020 Atlassian. All rights reserved.