Package FlaNium.WinAPI.elements
Class Grid
- java.lang.Object
-
- org.openqa.selenium.remote.RemoteWebElement
-
- FlaNium.WinAPI.DesktopElement
-
- FlaNium.WinAPI.elements.Grid
-
- All Implemented Interfaces:
org.openqa.selenium.interactions.Locatable,org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebElement,org.openqa.selenium.WrapsDriver
public class Grid extends DesktopElement
-
-
Constructor Summary
Constructors Constructor Description Grid(org.openqa.selenium.WebElement element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GridRowaddToSelection(int rowIndex)Add a row to the selection by index.GridRowaddToSelection(int columnIndex, String textToFind)Add a row to the selection by text in the given column.intcolumnCount()Gets the total column count.List<org.openqa.selenium.remote.RemoteWebElement>columnHeaders()Gets all column header elements.GridHeadergetHeader()Gets the header item.GridRowgetRowByIndex(int rowIndex)Get a row by index.GridRowgetRowByValue(int columnIndex, String textToFind)Get a row by text in the given column.List<GridRow>getRows()Returns the rows which are currently visible to UIA.List<GridRow>getRowsByValue(int columnIndex, String value, int maxItems)Get all rows where the value of the given column matches the given value.GridRowremoveFromSelection(int rowIndex)Remove a row from the selection by index.GridRowremoveFromSelection(int columnIndex, String textToFind)Remove a row from the selection by text in the given column.introwCount()Gets the total row count.List<org.openqa.selenium.remote.RemoteWebElement>rowHeaders()Gets all row header elements.RowOrColumnMajorrowOrColumnMajor()Gets whether the data should be read primarily by row or by column.GridRowselect(int rowIndex)Select a row by index.GridRowselect(int columnIndex, String textToFind)Select the first row by text in the given column.GridRowselectedItem()Gets the first selected item or null otherwise.List<GridRow>selectedItems()Gets all selected items.-
Methods inherited from class FlaNium.WinAPI.DesktopElement
callValueCommand, callValueCommand, callValueCommand, callValueCommand, callValueCommand, callValueCommand, callVoidCommand, castTo, createLocalDateTimeFromResponse, createRemoteWebElementFromResponse, createRemoteWebElementsFromResponse, exe, execute, getActiveWindow, getAttribute, getElementRect, getName, mouseActions, parseDateTime, parseDouble, screenshotActions, setAsRootElement, toCoordinateElement, touchActions
-
Methods inherited from class org.openqa.selenium.remote.RemoteWebElement
clear, click, equals, execute, findElement, findElement, findElements, findElements, getAccessibleName, getAriaRole, getCoordinates, getCssValue, getDomAttribute, getDomProperty, getId, getLocation, getRect, getScreenshotAs, getShadowRoot, getSize, getTagName, getText, getWrappedDriver, hashCode, isDisplayed, isEnabled, isSelected, sendKeys, setFileDetector, setFoundBy, setId, setParent, submit, toJson, toString
-
-
-
-
Method Detail
-
rowCount
public int rowCount()
Gets the total row count.
-
columnCount
public int columnCount()
Gets the total column count.
-
columnHeaders
public List<org.openqa.selenium.remote.RemoteWebElement> columnHeaders()
Gets all column header elements.
-
rowHeaders
public List<org.openqa.selenium.remote.RemoteWebElement> rowHeaders()
Gets all row header elements.
-
rowOrColumnMajor
public RowOrColumnMajor rowOrColumnMajor()
Gets whether the data should be read primarily by row or by column.
-
getHeader
public GridHeader getHeader()
Gets the header item.
-
getRows
public List<GridRow> getRows()
Returns the rows which are currently visible to UIA. Might not be the full list (eg. in virtualized lists)!
-
selectedItem
public GridRow selectedItem()
Gets the first selected item or null otherwise.
-
select
public GridRow select(int rowIndex)
Select a row by index.- Parameters:
rowIndex-- Returns:
-
select
public GridRow select(int columnIndex, String textToFind)
Select the first row by text in the given column.- Parameters:
columnIndex-textToFind-- Returns:
-
addToSelection
public GridRow addToSelection(int rowIndex)
Add a row to the selection by index.- Parameters:
rowIndex-- Returns:
-
addToSelection
public GridRow addToSelection(int columnIndex, String textToFind)
Add a row to the selection by text in the given column.- Parameters:
columnIndex-textToFind-- Returns:
-
removeFromSelection
public GridRow removeFromSelection(int rowIndex)
Remove a row from the selection by index.- Parameters:
rowIndex-- Returns:
-
removeFromSelection
public GridRow removeFromSelection(int columnIndex, String textToFind)
Remove a row from the selection by text in the given column.- Parameters:
columnIndex-textToFind-- Returns:
-
getRowByIndex
public GridRow getRowByIndex(int rowIndex)
Get a row by index.- Parameters:
rowIndex-- Returns:
-
getRowByValue
public GridRow getRowByValue(int columnIndex, String textToFind)
Get a row by text in the given column.- Parameters:
columnIndex-textToFind-- Returns:
-
getRowsByValue
public List<GridRow> getRowsByValue(int columnIndex, String value, int maxItems)
Get all rows where the value of the given column matches the given value.- Parameters:
columnIndex- The column index to check.value- The value to check.maxItems- Maximum numbers of items to return, 0 for all.- Returns:
- List of found rows.
-
-