如何从aria-rowcount获得价值,我需要那517个价值。
我也附有图片<div class="dx-datagrid dx-gridbase-container" role="grid" aria-label="Data grid" aria-rowcount="517" aria-colcount="4">
async getNrOfTables() {
console.log(' ### => Get the number of tables ');
BrowserUtil.waitForElement(this.nrOfTables);
await browser.sleep(2000);
let j = this.nrOfTables.getAttribute('aria-rowcount')
console.log(' ### => The number of tables ', j);
return this;
}
尝试此解决方案以获取属性值
async getNrOfTables(){
//if you are using any waits then use here
let j = await this.nrOfTables.getAttribute('aria-rowcount');
console.log("Number of tables: " + j);
return j;
}