Class: DataGridProDriver
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:46
Driver for Material UI v7 DataGridPro component.
See​
https://mui.com/x/react-data-grid/
Extends​
ComponentDriver<typeofparts>
Constructors​
Constructor​
new DataGridProDriver(
locator,interactor,option?):DataGridProDriver
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:47
Parameters​
locator​
PartLocator
interactor​
Interactor
option?​
Partial<IComponentDriverOption<{ }>>
Returns​
DataGridProDriver
Overrides​
ComponentDriver<typeof parts>.constructor
Properties​
commutableOption​
readonlycommutableOption:IComponentDriverOption<{footer: {driver: typeofDataGridFooterDriver;locator:CssLocator; };headerRow: {driver: typeofDataGridHeaderRowDriver;locator:PartLocator; };loading: {driver: typeofHTMLElementDriver;locator:CssLocator; };skeletonOverlay: {driver: typeofHTMLElementDriver;locator:CssLocator; }; }>
Defined in: core/dist/index.d.mts:999
Option passed to the constructor includes both universal options which can be shared across all component driver tree, and component specific options which are only applicable to the component.
Commutable option is the option that can be shared across all component driver tree.
Inherited from​
ComponentDriver.commutableOption
interactor​
readonlyinteractor:Interactor
Defined in: core/dist/index.d.mts:990
Inherited from​
ComponentDriver.interactor
Accessors​
driverName​
Get Signature​
get driverName():
string
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:202
Returns​
string
Overrides​
ComponentDriver.driverName
locator​
Get Signature​
get locator():
PartLocator
Defined in: core/dist/index.d.mts:1044
Return the locator of the component
Returns​
PartLocator
Inherited from​
ComponentDriver.locator
parts​
Get Signature​
get parts():
ScenePartDriver<T>
Defined in: core/dist/index.d.mts:1040
Return driver instance of all the named parts
Returns​
ScenePartDriver<T>
Inherited from​
ComponentDriver.parts
Methods​
activate()​
activate():
Promise<void>
Defined in: core/dist/index.d.mts:1091
Activate the component without relying on pointer geometry. See Interactor.activate.
Returns​
Promise<void>
Inherited from​
ComponentDriver.activate
click()​
click(
option?):Promise<void>
Defined in: core/dist/index.d.mts:1068
Parameters​
option?​
Partial<ClickOption>
Returns​
Promise<void>
Inherited from​
ComponentDriver.click
contextMenu()​
contextMenu():
Promise<void>
Defined in: core/dist/index.d.mts:1087
Dispatch a right-click / contextmenu event on the component. See Interactor.contextMenu.
Returns​
Promise<void>
Inherited from​
ComponentDriver.contextMenu
drag()​
drag(
delta):Promise<void>
Defined in: core/dist/index.d.mts:1129
Drag this component by the given pixel delta from its center. See Interactor.drag.
Prefer a keyboard-driven setValue over a true drag in real drivers — these
drag primitives exist only for cases keyboard cannot express (e.g. panning a
Lightbox, reordering a column). jsdom has no layout engine, so the positional
outcome of the drag is E2E-only there.
Parameters​
delta​
Point
Pixel offset to drag by
Returns​
Promise<void>
Inherited from​
ComponentDriver.drag
dragTo()​
dragTo(
target):Promise<void>
Defined in: core/dist/index.d.mts:1118
Drag this component and drop it onto another component. See Interactor.dragTo.
Prefer a keyboard-driven setValue over a true drag in real drivers — these
drag primitives exist only for cases keyboard cannot express (e.g. panning a
Lightbox, reordering a column). jsdom has no layout engine, so the positional
outcome of the drag is E2E-only there.
Parameters​
target​
ComponentDriver<any>
Another driver whose root element is the drop target
Returns​
Promise<void>
Inherited from​
ComponentDriver.dragTo
enforcePartExistence()​
protectedenforcePartExistence(partName):Promise<void>
Defined in: core/dist/index.d.mts:1050
Check the specified parts' existences, and throw MissingPartError if any of the part is found not existence. Existence is defined by the part's existence in the DOM regardless of its visibility on the screen
Parameters​
partName​
"headerRow" | "loading" | "skeletonOverlay" | "footer" | readonly ("headerRow" | "loading" | "skeletonOverlay" | "footer")[]
Single or array of the names of the parts to be enforced
Returns​
Promise<void>
Inherited from​
ComponentDriver.enforcePartExistence
exists()​
exists():
Promise<boolean>
Defined in: core/dist/index.d.mts:1067
Whether the component exists/attached to the DOM
Returns​
Promise<boolean>
true if the component is attached to the DOM, false otherwise
Inherited from​
ComponentDriver.exists
focus()​
focus(
option?):Promise<void>
Defined in: core/dist/index.d.mts:1077
Parameters​
option?​
Partial<FocusOption>
Returns​
Promise<void>
Inherited from​
ComponentDriver.focus
getAttribute()​
getAttribute(
attributeName):Promise<Optional<string>>
Defined in: core/dist/index.d.mts:1062
Parameters​
attributeName​
string
Returns​
Promise<Optional<string>>
Inherited from​
ComponentDriver.getAttribute
getBoundingRect()​
getBoundingRect():
Promise<BoundingRect>
Defined in: core/dist/index.d.mts:1136
Get this component's bounding rectangle. See Interactor.getBoundingRect.
jsdom has no layout engine, so every coordinate and dimension is 0 there;
real geometry is E2E-only.
Returns​
Promise<BoundingRect>
Inherited from​
ComponentDriver.getBoundingRect
getCell()​
getCell<
DriverT>(query,driverClass?):Promise<DriverT|null>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:138
Get the cell driver for the cell, if the cell does not exist, return null The cell driver is default to HTMLElementDriver, you can specify a different driver class
Type Parameters​
DriverT​
DriverT extends ComponentDriver<{ }>
Parameters​
query​
The query to locate the cell
driverClass?​
ComponentDriverCtor<DriverT> = ...
Optional, the driver class to use for the cell, default to HTMLElementDriver
Returns​
Promise<DriverT | null>
getCellText()​
getCellText(
query):Promise<string>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:160
Get the text content of the cell, if the cell does not exist, throw an error
Parameters​
query​
The query to locate the cell
Returns​
Promise<string>
getColumnCount()​
getColumnCount():
Promise<number>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:77
The number of columns currently displayed in the data grid, note that data grid pro uses virtualize rendering, therefore the column count heavily depends on the viewport size
Returns​
Promise<number>
The number of columns currently displayed in the data grid
getHeaderText()​
getHeaderText():
Promise<string[]>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:85
The array text of the header row, note that columns not shown in the viewport may not be included because of virtualize rendering
Returns​
Promise<string[]>
The array of text of the header row
getMissingPartNames()​
protectedgetMissingPartNames(partName):Promise<readonly ("headerRow"|"loading"|"skeletonOverlay"|"footer")[]>
Defined in: core/dist/index.d.mts:1056
Get the names of parts not in the DOM
Parameters​
partName​
"headerRow" | "loading" | "skeletonOverlay" | "footer" | readonly ("headerRow" | "loading" | "skeletonOverlay" | "footer")[]
Single or array of the names of the parts to be examined
Returns​
Promise<readonly ("headerRow" | "loading" | "skeletonOverlay" | "footer")[]>
Inherited from​
ComponentDriver.getMissingPartNames
getPaginationDescription()​
getPaginationDescription():
Promise<Optional<string>>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:196
Returns​
Promise<Optional<string>>
getRow()​
getRow(
rowIndex):Promise<DataGridHeaderRowDriver|null>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:108
Return the row driver for the row at the specified index, if the row does not exist, return null
Parameters​
rowIndex​
number
Returns​
Promise<DataGridHeaderRowDriver | null>
getRowCount()​
getRowCount():
Promise<number>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:94
The number of rows currently displayed in the data grid, note that data grid pro uses virtualize rendering, therefore the row count heavily depends on the viewport size
Returns​
Promise<number>
The number of columns currently displayed in the data grid
getRowText()​
getRowText(
rowIndex):Promise<string[]>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:123
The array text of the specified row, note that columns not shown in the viewport may not be included because of virtualize rendering
Parameters​
rowIndex​
number
The index of the row
Returns​
Promise<string[]>
The array of text of the specified row
getText()​
getText():
Promise<Optional<string>>
Defined in: core/dist/index.d.mts:1061
Get the combined text content of the component
Returns​
Promise<Optional<string>>
If the component exists and has content, it should return the text or otherwise undefined
Inherited from​
ComponentDriver.getText
gotoNextPage()​
gotoNextPage():
Promise<void>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:191
Returns​
Promise<void>
gotoPreviousPage()​
gotoPreviousPage():
Promise<void>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:181
Returns​
Promise<void>
hover()​
hover(
option?):Promise<void>
Defined in: core/dist/index.d.mts:1069
Parameters​
option?​
Partial<HoverOption>
Returns​
Promise<void>
Inherited from​
ComponentDriver.hover
innerHTML()​
innerHTML():
Promise<string>
Defined in: core/dist/index.d.mts:1168
Get the inner HTML of the component
Returns​
Promise<string>
The inner HTML of the component
Inherited from​
ComponentDriver.innerHTML
isFooterVisible()​
isFooterVisible():
Promise<boolean>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:172
Returns​
Promise<boolean>
isLoading()​
isLoading():
Promise<boolean>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:58
Checks if the data grid is currently loading.
Returns​
Promise<boolean>
A promise that resolves to a boolean indicating if the data grid is loading.
isNextPageEnabled()​
isNextPageEnabled():
Promise<boolean>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:186
Returns​
Promise<boolean>
isPreviousPageEnabled()​
isPreviousPageEnabled():
Promise<boolean>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:176
Returns​
Promise<boolean>
isVisible()​
isVisible():
Promise<boolean>
Defined in: core/dist/index.d.mts:1145
Whether the component is visible. Visibility is defined
that the component does not have the CSS property display: none,
visibility: hidden, or opacity: 0. However this does not
check whether the component is within the viewport.
Returns​
Promise<boolean>
true if the component is visible, false otherwise
Inherited from​
ComponentDriver.isVisible
mouseDown()​
mouseDown(
option?):Promise<void>
Defined in: core/dist/index.d.mts:1071
Parameters​
option?​
Partial<MouseDownOption>
Returns​
Promise<void>
Inherited from​
ComponentDriver.mouseDown
mouseEnter()​
mouseEnter(
option?):Promise<void>
Defined in: core/dist/index.d.mts:1075
Parameters​
option?​
Partial<MouseEnterOption>
Returns​
Promise<void>
Inherited from​
ComponentDriver.mouseEnter
mouseLeave()​
mouseLeave(
option?):Promise<void>
Defined in: core/dist/index.d.mts:1076
Parameters​
option?​
Partial<MouseLeaveOption>
Returns​
Promise<void>
Inherited from​
ComponentDriver.mouseLeave
mouseMove()​
mouseMove(
option?):Promise<void>
Defined in: core/dist/index.d.mts:1070
Parameters​
option?​
Partial<MouseMoveOption>
Returns​
Promise<void>
Inherited from​
ComponentDriver.mouseMove
mouseOut()​
mouseOut(
option?):Promise<void>
Defined in: core/dist/index.d.mts:1074
Parameters​
option?​
Partial<MouseOutOption>
Returns​
Promise<void>
Inherited from​
ComponentDriver.mouseOut
mouseOver()​
mouseOver(
option?):Promise<void>
Defined in: core/dist/index.d.mts:1073
Parameters​
option?​
Partial<HoverOption>
Returns​
Promise<void>
Inherited from​
ComponentDriver.mouseOver
mouseUp()​
mouseUp(
option?):Promise<void>
Defined in: core/dist/index.d.mts:1072
Parameters​
option?​
Partial<MouseUpOption>
Returns​
Promise<void>
Inherited from​
ComponentDriver.mouseUp
pressKey()​
pressKey(
key,option?):Promise<void>
Defined in: core/dist/index.d.mts:1083
Dispatch a keyboard key press on the component. See Interactor.pressKey.
Parameters​
key​
string
A KeyboardEvent.key value, e.g. 'Escape', 'Backspace', 'Enter'
option?​
Partial<PressKeyOption>
Reserved for future modifier-key support
Returns​
Promise<void>
Inherited from​
ComponentDriver.pressKey
runtimeCssSelector()​
runtimeCssSelector():
Promise<string>
Defined in: core/dist/index.d.mts:1174
Get the runtime CSS selector of the component. This is useful for debugging and testing purposes.
Returns​
Promise<string>
The runtime CSS selector of the component
Inherited from​
ComponentDriver.runtimeCssSelector
scrollBy()​
scrollBy(
delta):Promise<void>
Defined in: core/dist/index.d.mts:1107
Scroll the component by the given pixel delta. See Interactor.scrollBy.
jsdom has no layout engine, so the scroll is a no-op there and behavioral assertions (resulting offset) are E2E-only.
Parameters​
delta​
Point
Pixel offset to scroll by
Returns​
Promise<void>
Inherited from​
ComponentDriver.scrollBy
scrollIntoView()​
scrollIntoView():
Promise<void>
Defined in: core/dist/index.d.mts:1098
Scroll the component into the viewport. See Interactor.scrollIntoView.
jsdom has no layout engine, so the scroll is a no-op there and behavioral assertions (visibility, offset) are E2E-only.
Returns​
Promise<void>
Inherited from​
ComponentDriver.scrollIntoView
waitForLoad()​
waitForLoad(
timeoutMs?):Promise<void>
Defined in: component-driver-mui-x-v7/src/components/datagrid/DataGridProDriver.ts:67
Waits for the data grid to exit the loading state.
Parameters​
timeoutMs?​
number = 10000
The maximum time to wait for the load to complete, in milliseconds.
Returns​
Promise<void>
waitUntil()​
waitUntil<
T>(option):Promise<T>
Defined in: core/dist/index.d.mts:1163
Type Parameters​
T​
T
Parameters​
option​
WaitUntilOption<T>
Returns​
Promise<T>
Inherited from​
ComponentDriver.waitUntil
waitUntilComponentState()​
waitUntilComponentState(
option?):Promise<void>
Defined in: core/dist/index.d.mts:1162
Wait until the component is in the expected state such as the component's visibility or existence. If the component has not reached the expected state within the timeout, it will throw an error.
By default it waits until the component is attached to the DOM within 30 seconds.
Parameters​
option?​
Partial<Readonly<WaitForOption>>
The option to configure the wait behavior
Returns​
Promise<void>
Inherited from​
ComponentDriver.waitUntilComponentState
waitUntilVisible()​
waitUntilVisible(
timeoutMs?):Promise<void>
Defined in: core/dist/index.d.mts:1150
Wait until the component is attached and becomes visible to the DOM.
Parameters​
timeoutMs?​
number
The number of milliseconds to wait before timing out
Returns​
Promise<void>
Inherited from​
ComponentDriver.waitUntilVisible
overriddenParentLocator()​
staticoverriddenParentLocator():Optional<PartLocator>
Defined in: core/dist/index.d.mts:1026
Portal hook: where to re-root this driver's locator when its component renders
outside the parent's DOM (a modal, popup, drawer). Return the PartLocator
that locates the component from the document root, or undefined (the default)
for normal in-tree components whose locator chains from the parent.
This is static because it is per-class metadata read off the constructor
before any instance exists — which makes the "no instance state" constraint
structural rather than a documented caution. Override with static override.
Returns​
Optional<PartLocator>
Inherited from​
ComponentDriver.overriddenParentLocator
overrideLocatorRelativePosition()​
staticoverrideLocatorRelativePosition():Optional<LocatorRelativePosition>
Defined in: core/dist/index.d.mts:1036
Portal hook: the locator relative position to apply when the component's real
DOM is a sibling/elsewhere rather than a descendant (e.g. a MUI dialog rendered
at the document root, located by a "Same"-level selector). Return undefined
(the default) to keep the natural position declared by the ScenePart.
Static for the same reason as ComponentDriver.overriddenParentLocator:
it is class-level metadata read before construction. Override with static override.
Returns​
Optional<LocatorRelativePosition>
Inherited from​
ComponentDriver.overrideLocatorRelativePosition