PDFSignatureField Object
Description
A box for signing documents with a digital signature.
IMPORTANT
Recording on PDFSignatureField test objects is not supported.
Operations
The sections below list the built-in methods and properties that you can use as operations for the PDFSignatureField object.
Note: You can also view a list and descriptions of the PDFSignatureField description properties, for use in object repository descriptions, programmatic descriptions, checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods.
Methods
CaptureBitmap | Saves a screen capture of the object as a .png or .bmp image using the specified file name. |
Check | Checks whether the actual value of an item matches the expected value. |
CheckProperty | Checks whether the actual value of the specified object property matches the specified expected value within the specified timeout. |
ChildObjects | Returns the collection of child objects contained within the object. |
Click | Clicks the object. |
DblClick | Double-clicks the object. |
GetAllROProperties | Returns the collection of properties and current values from the object in the application. |
GetROProperty | Returns the current value of the description property from the object in the application. |
GetTOProperties | Returns the collection of properties and values used to identify the object. |
GetTOProperty | Returns the value of the specified description property from the test object description. |
Highlight | Highlights the object in the application. |
Output | Retrieves the current value of an item and stores it in a specified location. |
RefreshObject | Instructs OpenText Functional Testing to re-identify the object in the application the next time a step refers to this object. |
Set | Sets the digital signature file for the signature element. |
SetFocus | Activates the selected object and brings it into focus. |
SetSecure | Sets the digital signature file for the signature element using an encrypted password. |
SetTOProperty | Sets the value of the specified description property in the test object description. |
ToString | Returns a string that represents the test object. |
Type | Simulates keyboard input on the object. |
WaitProperty | Waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step. |
Properties
Exist | Checks whether the object currently exists in the open application. |
Click Method
Description
Clicks the object.
Syntax
object.Click [X], [Y], [BUTTON]
Arguments
Parameter | Description |
---|---|
X |
Optional. An integer value. The x-coordinate of the click. Note that the specified coordinates are relative to the upper left corner of the object. The default value is the center of the object. Default value = -9999 |
Y |
Optional. An integer value. The y-coordinate of the click. Note that the specified coordinates are relative to the upper left corner of the object. The default value is the center of the object.
Default value = -9999 |
BUTTON |
Optional. A predefined constant or number. The mouse button used to click the object. Default value = micLeftBtn |
Return Type
None
Example
'The following example left-clicks in the center of the signature field 'and then right-clicks a specific point in the field. PDFApplication("Sample.pdf").PDFPage("Page 1").PDFSignatureField("SignatureField").Click PDFApplication("Sample.pdf").PDFPage("Page 1").PDFSignatureField("SignatureField").Click 200, 350, Right_Mouse_Button
DblClick Method
Description
Double-clicks the object.
Syntax
object.DblClick X, Y, [BUTTON]
Arguments
Parameter | Description |
---|---|
X |
Required. An integer value. The x-coordinate of the double-click. Note that the specified coordinates are relative to the upper left corner of the object. |
Y |
Required. An integer value. The y-coordinate of the double-click. Note that the specified coordinates are relative to the upper left corner of the object. |
BUTTON |
Optional. A predefined constant or number. The mouse button used to double-click the object. Default value = micLeftBtn |
Return Type
None
Example
'The following example double-left-clicks in the center of the signature field 'and then double-right-clicks a specific point in the field. PDFApplication("Sample.pdf").PDFPage("Page 1").PDFSignatureField("SignatureField").DblClick PDFApplication("Sample.pdf").PDFPage("Page 1").PDFSignatureField("SignatureField").DblClick 200, 350, Right_Mouse_Button
Set Method
Description
Sets the digital signature file for the signature element.
Syntax
object.Set fullSignaturePath, signaturePassword, [signImagePath], [signContactInfo], [signLocation], [signName], [signReason]
Arguments
Parameter | Description |
---|---|
fullSignaturePath | Required. A string value. The full path to the digital signature file to use. The file must be of type .pfx. |
signaturePassword | Required. A string value. The password for the digital signature file. |
signImagePath | Optional. A string value. A path to an image file used to sign the signature. |
signContactInfo | Optional. A string value. Contact information to use when setting the signature. |
signLocation | Optional. A string value. Location information to use when setting the signature. |
signName | Optional. A string value. Name information to use when setting the signature. |
signReason | Optional. A string value. Reason information to use when setting the signature. |
Return Type
Boolean. True if the document is signed successfully, otherwise False .
Example
'The following example enters a signature file in a PDF signature field 'providing the signature's password. PDFApplication("Sample.pdf").PDFPage("Page 1").PDFSignatureField("Signature1").Set "C:\Temp\Demo.pfx", "P@ssword"
SetFocus Method
Description
Activates the selected object and brings it into focus.
Syntax
object.SetFocus
Return Type
None.
Example
'The following example sets the focus on a signature field in an open PDF application. PDFApplication("Sample.pdf").PDFPage("Page 1").PDFSignatureField("SignatureField").SetFocus
SetSecure Method
Description
Sets the digital signature file for the signature element using an encrypted password.
Syntax
object.SetSecure fullSignaturePath, encryptedSignaturePassword, [signImagePath], [signContactInfo], [signLocation], [signName], [signReason]
Arguments
Parameter | Description |
---|---|
fullSignaturePath | Required. A string value. The full path to the digital signature file to use. The file must be of type .pfx. |
encryptedSignaturePassword | Required. A string value. The encrypted password for the digital signature file. |
signImagePath | Optional. A string value. A path to an image file used to sign the signature. |
signContactInfo | Optional. A string value. Contact information to use when setting the signature. |
signLocation | Optional. A string value. Location information to use when setting the signature. |
signName | Optional. A string value. Name information to use when setting the signature. |
signReason | Optional. A string value. Reason information to use when setting the signature. |
Return Type
Boolean. True if the document is signed successfully, otherwise False .
IMPORTANT
To find the encoded value to use as the argument for the this method, do one of the following:
Use the Password Encoder utility (available from the Windows Start menu).
- Parameterize the argument using a Data Table parameter and use the Data Table encryption option (right-click each unencrypted value in the password column and choose Data > Encrypt).
For more information, refer to the OpenText Functional Testing User Guide.
While the SetSecure method enables you to hide passwords on the screen during a run session, it is not intended to be a secure way to protect password information.
Example
'The following example enters a signature file in a PDF signature field 'providing an encrypted password for the signature file. PDFApplication("Sample.pdf").PDFPage("Page 1").PDFSignatureField("Signature1").SetSecure "C:\Temp\Demo.pfx", "5cd12f246ca2c35fc0f143b41a0893afe15d1b63724e"
Type Method
Description
Simulates keyboard input on the object.
Syntax
object.Type KeyboardInput
Arguments
Parameter | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
KeyboardInput |
Required. A String value.
|
Return Type
None
IMPORTANT
Although the Type method is supported for most objects, if you enter a Type statement for an object in which a user cannot enter text, the method has no visual effect.
See also: