# TestPart data type
> Version: _Available or changed with runtime version 1.0._
Represents a variable type that can be used to test Page Application Objects of type Part.
## Instance methods
The following methods are available on instances of the TestPart data type.
Method name|Description
testpart-caption-method|Gets the caption of the test page.
testpart-editable-method|Gets the runtime value of the Editable property on a test page.
testpart-enabled-method|Gets the enabled state for the part.
Expand(Boolean)<testpart-expand-method>|Expands rows on a test page.
FindFirstField(TestField, Any)<testpart-findfirstfield-method>|Finds the first field in the data set that is displayed on a test page.
FindNextField(TestField, Any)<testpart-findnextfield-method>|Finds the next field in the data set that is displayed on a test page.
FindPreviousField(TestField, Any)<testpart-findpreviousfield-method>|Finds the previous field in the data set that is displayed on a test page.
testpart-first-method|Sets the current row of the test page as the first row in the data set.
GetField(Integer)<testpart-getfield-method>|Gets a field on a test page.
GetValidationError([Integer])<testpart-getvalidationerror-method>|Gets the list of all validation error that occurred on a test page as a string.
GoToKey([Any,...])<testpart-gotokey-method>|Finds the row in a data set on the test page that is identified by the specified values.
GoToRecord(Record)<testpart-gotorecord-method>|Finds the specified record in a data set on a test page.
testpart-isexpanded-method|Specifies if the current row on the test page is expanded.
testpart-last-method|Sets the current row of the test page as the last row in the data set.
testpart-new-method|Sets the current row of the test page to an empty row in a data set.
testpart-next-method|Sets the current row of the test page as the next row in the data set.
testpart-prev-method|Sets the current row of the test page as the previous row in the data set.
testpart-previous-method|Sets the current row of the test page as the previous row in the data set.
testpart-validationerrorcount-method|Gets the number of validation errors that occurred on the test page.
testpart-visible-method|Gets the visible state for the part.
## Related information
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/testpart/testpart-data-type, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/testpart/testpart-data-type/
