PDF Step pdfVerifyBookmark
Description
This step verifies the existence of a bookmark within a PDF document.
Parameters
- name
- Required? yes
- The name of the bookmark to find.
- description
- Required? no
- The description of this test step.
- regex
- Required? no, default is 'false'
- Specifies whether the name represents a regular expression.
Details
Here is an example of using pdfVerifyBookmark:
pdfVerifyBookmark example
<steps>
<invoke url="testDocBookmarks.pdf"/>
<pdfVerifyBookmark name="He.*One" regex="true"/>
<pdfVerifyBookmark name="Subheading"/>
<not description="expect to fail: unknown bookmark">
<pdfVerifyBookmark name="Heading Three" />
</not>
<invoke url="testDocForms.pdf"/>
<not description="expect to fail: document has no bookmarks">
<pdfVerifyBookmark name=".*" regex="true" />
</not>
</steps>
<invoke url="testDocBookmarks.pdf"/>
<pdfVerifyBookmark name="He.*One" regex="true"/>
<pdfVerifyBookmark name="Subheading"/>
<not description="expect to fail: unknown bookmark">
<pdfVerifyBookmark name="Heading Three" />
</not>
<invoke url="testDocForms.pdf"/>
<not description="expect to fail: document has no bookmarks">
<pdfVerifyBookmark name=".*" regex="true" />
</not>
</steps>