在我的网站上,我有一个ag-grid,并且仅在滚动时才加载数据;如何获取整个标头值并进行断言?
我尝试了如下操作,并且在第1页上运行良好,一旦滚动,我将获得新的标题。如何获得标题的第二部分?
String[] expectedCol={"Subject","Date Received","Status","Tag","Assigned To","Sender Name","Receiver Name"};
List<WebElement> column=drvobj.findElements(By.xpath("//div [@class='ag-header-cell ag-header-cell-sortable']"));
for (int i=0;i<column.size();i++)
for (int j=0;j<expectedCol.length;j++){
System.out.println(column.get(i).getText());
System.out.println(expectedCol[j]);
if(column.get(i).getText().equals(expectedCol[j])){
System.out.println("Text Matched");
}
else{
System.out.println("Text Not Matched");
}
i++;
}