Package org.xwiki.export.pdf.test.po
Class PDFExportOptionsModal
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.test.ui.po.BaseModal
-
- org.xwiki.export.pdf.test.po.PDFExportOptionsModal
-
public class PDFExportOptionsModal extends BaseModal
Represents the actions possible on the modal used to configure and trigger the PDF export.- Since:
- 14.4.2, 14.5
- Version:
- $Id: 74f0023777e7f205a3a9396d4063e59293712ad1 $
-
-
Constructor Summary
Constructors Constructor Description PDFExportOptionsModal()
Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PDFDocument
export(URL hostURL, String userName, String password)
Click on the export button and wait for the PDF document to be generated.org.openqa.selenium.WebElement
getCoverCheckbox()
org.openqa.selenium.WebElement
getFooterCheckbox()
org.openqa.selenium.WebElement
getHeaderCheckbox()
org.openqa.selenium.support.ui.Select
getTemplateSelect()
org.openqa.selenium.WebElement
getTocCheckbox()
static PDFExportOptionsModal
open(ViewPage viewPage)
Opens the PDF export options modal for the given page.-
Methods inherited from class org.xwiki.test.ui.po.BaseModal
close, getTitle, isDisplayed, waitForClosed
-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Method Detail
-
open
public static PDFExportOptionsModal open(ViewPage viewPage)
Opens the PDF export options modal for the given page.- Parameters:
viewPage
- the page for which to open the PDF export options modal- Returns:
- the PDF export options modal
-
getTemplateSelect
public org.openqa.selenium.support.ui.Select getTemplateSelect()
- Returns:
- the select used to specify the PDF template
-
getCoverCheckbox
public org.openqa.selenium.WebElement getCoverCheckbox()
- Returns:
- the checkbox used to control whether the PDF cover page is generated or not
-
getTocCheckbox
public org.openqa.selenium.WebElement getTocCheckbox()
- Returns:
- the checkbox used to control whether the PDF Table of Contents page is generated or not
-
getHeaderCheckbox
public org.openqa.selenium.WebElement getHeaderCheckbox()
- Returns:
- the checkbox used to control whether the PDF header is generated or not
-
getFooterCheckbox
public org.openqa.selenium.WebElement getFooterCheckbox()
- Returns:
- the checkbox used to control whether the PDF footer is generated or not
-
export
public PDFDocument export(URL hostURL, String userName, String password) throws IOException
Click on the export button and wait for the PDF document to be generated.- Parameters:
hostURL
- the URL that can be used to access the XWiki instance from the test code; this may be different than the URL used by the browser (e.g. in case the browser is running inside a Docker container)userName
- the user name used to access the generated PDF documentpassword
- the password used to access the generated PDF document- Returns:
- the generated PDF document
- Throws:
IOException
- if the PDF export fails
-
-