单击单元格
动词:clickGrid
单击网格中的单元格。
语法
clickGrid --grid(ImageGrid) --row(Numeric) --column(Numeric)
输入
| 脚本 | 设计器 | 必需的 | AcceptedTypes | Description |
|---|---|---|---|---|
| --grid | 网格 | 必需的 | 图像网格 | 在其中单击单元格的网格。必须映射此参数中指定的网格。 |
| --row | 行 | 必需的 | 成员 | 应单击的单元格所在的行。 |
| --column | 列 | 必需的 | 成员 | 应单击的单元格所在的列。数字按从左到右的顺序表示各个列。 |
示例
使用等待窗口显示命令等待打开的 Excel 窗口,并使用将焦点置于窗口上在前台将焦点置于此窗口上。 将映射网格,使用单击单元格命令单击第二行和第三行的第一个单元格。
defVar --name window --type Window
defVar --name window --type Window
defVar --name success --type Boolean
defVar --name mappedTable --type ImageGrid
openFile --file "tableExcelCompanyCity.xlsx"
waitWindow --title "tableExcelCompanyCity.xlsx - Excel" --classname XLMAIN --processname EXCEL window=value success=success
mapGrid --columnmappings "28-91;91-151;151-219;219-282;282-346;346-408;408-475;475-537;537-604;604-666;666-730;730-793;793-861;861-919;919-985;985-1050;" --selector "IdAndName" --id Grid --name Grid mappedTable=value
focusWindow --window ${window}
clickGrid --grid ${mappedTable} --row 2 --column 1
clickGrid --grid ${mappedTable} --row 3 --column 1
delay --timeout 00:00:03
// Waits for opened Excel window, maps window grid.
// Focuses on the foreground window for demonstration.
// Click on the cells located in the first column, second and third row.
// Waits 3 seconds and ends execution.
要正确操作命令,必须在下载文件后将其路径插入到运行命令的路径参数中。