JTable Class

Description

Represents a table control which has rows and columns.

Inheritance Hierarchy

Syntax

C#
public class JTable : JComponent, 
VB
'Declaration
Public Class JTable _
Inherits JComponent

Properties

Name Description
AccessibleName The accessible name of the component. (Inherited from AWTComponent)
AccessibleRole The accessible role of the component. (Inherited from AWTComponent)
AllCellTexts the text values of all cells in the table. The cells are grouped in rows, where each row contains the texts of its cells.
AllCellValues the values of all cells in the table. The cells are grouped in rows, where each row contains the values of its cells.
Background The background color of the component. (Inherited from AWTComponent)
ColumnCount the number of columns in the table.
Cursor The name of the cursor set in the component. (Inherited from AWTComponent)
EditingColumn the name or index of the column that contains the cell currently being edited.
EditingRow the index of the row that contains the cell currently being edited.
Enabled whether the component is enabled. (Inherited from AWTComponent)
Focusable whether the component can be focused. (Inherited from AWTComponent)
Font The font of the component. (Inherited from AWTComponent)
Foreground The foreground color of the component. (Inherited from AWTComponent)
Height The current height of the component. (Inherited from AWTComponent)
Name The name of the component. (Inherited from AWTComponent)
NativeHandle The native window handle for the object. (Inherited from INativeWindow)
RowCount the number of rows that can be shown in the table.
SelectedColumn the index or name of the selected column. -1 (4Test: 0) is returned if no column is selected.
SelectedColumns the list of indices of all selected columns.
SelectedRow the index of the selected row, -1 (4Test: 0) is returned if no row is selected.
SelectedRows the list of indices of all selected rows.
Text The text of the control. (Inherited from TestObject)
ToolTipText the tool tip text of a Swing component. (Inherited from JComponent)
Value The value of the control, e.g.: text in a text control. (Inherited from TestObject)
Width The current width of the component. (Inherited from AWTComponent)

Methods

Name Description
CaptureBitmap Saves a bitmap image of this object to a file. If you do not specify an absolute file name, the bitmap is saved to the default bitmap location on the machine that runs the Agent, which is %LOCALAPPDATA%/Silk/SilkTest/capturedBitmaps. The captured bitmap's pixels are stored in 32bit RGB order; when parsing the image the 4th byte (alpha channel) of every pixel must be ignored as it is used only for padding. In .NET, the constant System.Drawing.Imaging.PixelFormat.Format32bppRgb can be used for this purpose. (Inherited from TestObject)
ClearSelection Deselects all selected columns and rows.
Click Clicks on the object. (Inherited from IClickable)
ClickCell Clicks the specified cell in the table.
DoubleClick Double-clicks a mouse button on the object. (Inherited from IClickable)
DoubleClickCell Double-clicks the specified cell in the table.
Exists Checks if any child object matching the locator exists for an object in the application under test. If the timeout parameter is passed the agent retries finding until the given timeout expires. If no timeout is specified and no object is found initially false is returned immediately. (Inherited from TestObject)
Exists Checks if an object exists in the application under test. (Inherited from TestObject)
Find Finds an object specified by an XPath locator. (Inherited from TestObject)
FindAll Finds all objects specified by an XPath locator. (Inherited from TestObject)
FindCell Returns the cell containing the specified text.
GenerateLocator Returns a locator for this object. (Inherited from TestObject)
GetCellText Returns the cell text.
GetCellValue Returns the cell value.
GetChildren Returns the child objects of this object. (Inherited from TestObject)
GetColumnName Returns the name of the column at the specified index.
GetDynamicMethodList Returns a list of methods (including their signature) that can be dynamically invoked on this TestObject. (Inherited from TestObject)
GetParent Looks up the parent of this object in the test application. (Inherited from TestObject)
GetProperty Returns the value of the specified property. (Inherited from TestObject)
GetPropertyList Returns a list of property names that can be retrieved for the given object. (Inherited from TestObject)
GetRect Returns the size and position of this object. Per default the returned coordinates are relative to the parent window that contains this object. (Inherited from TestObject)
HighlightObject Highlights this object. (Inherited from TestObject)
ImageClick Clicks on the specified image asset. (Inherited from TestObject)
ImageClickFile Clicks on the specified image. (Inherited from TestObject)
ImageExists Returns whether the specified image asset exists. (Inherited from TestObject)
ImageExistsFile Returns whether the specified image exists. (Inherited from TestObject)
ImageRectangle Returns the object-relative rectangle of the specified image asset. (Inherited from TestObject)
ImageRectangleFile Returns the object-relative rectangle of the specified image. (Inherited from TestObject)
Invoke Dynamically invokes a method on the test object. (Inherited from TestObject)
InvokeMethods Dynamically invokes a sequence of methods starting at this TestObject. (Inherited from TestObject)
IsCellEditable Returns true if the specified cell is editable.
IsCellSelected Returns true if the specified cell is selected; otherwise false.
IsColumnSelected Returns true if the specified column is selected.
IsFocused Return whether the control has focus. (Inherited from IFocusable)
IsRowSelected Returns true if the specified row is selected.
MouseMove Moves the pointer to the specified location in the object. This method is not supported for mobile Web applications. (Inherited from IClickable)
MoveColumn Moves the column to the position of the target column.
OpenContextMenu Opens a context menu at the specified position. (Inherited from AWTComponent)
PressKeys Presses (but does not release) a set of keys or mouse buttons. (Inherited from IKeyable)
PressMouse Presses (but does not release) a mouse button in the object. This method is not supported for mobile Web applications. (Inherited from IClickable)
ReleaseKeys Releases a set of keys or mouse buttons. (Inherited from IKeyable)
ReleaseMouse Releases a mouse button. This method is not supported for mobile Web applications. (Inherited from IClickable)
ResizeColumn Resizes the specified column.
ScrollCellIntoView Scrolls the specified cell into view.
ScrollIntoView Scrolls the component into view if it is hidden and a child of a scroll pane. (Inherited from AWTComponent)
SelectAll Selects all rows, columns, and cells in the table.
SelectColumn Selects the specified column.
SelectRow Selects the specified row.
SetCellValue Sets the specified value for the specified cell in the table.
SetFocus Gives focus to the control. (Inherited from IFocusable)
SetProperty Sets the value of the specified property. (Inherited from TestObject)
StartScreenRecording Starts screen recording (Inherited from TestObject)
StopScreenRecording Stops screen recording (Inherited from TestObject)
TextCapture Returns the text in this object's visible area. (Inherited from TestObject)
TextClick Clicks in the center of the specified text. (Inherited from TestObject)
TextExists Returns whether the specified text exists. (Inherited from TestObject)
TextRectangle Returns the object-relative rectangle of the specified text. (Inherited from TestObject)
TypeKeys Sends a set of keystrokes to the object. (Inherited from IKeyable)
TypePasswordKeys Types an encrypted password into an object, for example a text field. (Inherited from IKeyable)
Verify Executes a verification on the given asset in the context of this UI object. (Inherited from TestObject)
WaitForChildDisappearance Waits until the specified child object does not exist or until the timeout is reached. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForDisappearance Waits until the object does not exist or until the timeout is reached. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForObject Waits for an object that matches the specified locator. If no object matches within an timeout an ObjectNotFoundException is thrown. The default timeout is 5 seconds and you can change the timeout by setting the value of the option OPT_WAIT_RESOLVE_OBJDEF. Use WaitForObject if the AUT takes a long time to display a specific object, for example when a transaction is processed before showing any results. By default, an action in the UI does not require a WaitForObject, because of the built-in synchronization. If you receive random timeout errors during normal script execution, consider increasing the default timeout instead of adding WaitForObject statements to your scripts. (Inherited from TestObject)
WaitForProperty Waits until the specified property has the specified value or until the timeout is reached.If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForPropertyNotEquals Waits until the specified property has a value that is different to the specified value or until the timeout is reached.If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForScreenshotStable Waits until the control is visually stable and does not change its position, by comparing screenshots taken with the specified interval. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_SCREENSHOT_STABLE will be used. The default interval is 200 milliseconds. An exception is thrown if the timeout is reached. (Inherited from TestObject)