多维表格
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
636 B

import { Page, Locator } from "@playwright/test";
import { SelectOptionCellPageObject } from "./SelectOptionCell";
export class CellPageObject {
readonly page: Page;
readonly selectOption: SelectOptionCellPageObject;
constructor(page: Page) {
this.page = page;
this.selectOption = new SelectOptionCellPageObject(this);
}
get({index, columnHeader}: {index: number, columnHeader: string}): Locator {
return this.page.locator(`td[data-pw="cell-${columnHeader}-${index}"]`);
}
async click({index, columnHeader}: {index: number, columnHeader: string}) {
return this.get({index, columnHeader}).click();
}
}