删除文本框中内容:
inputKeys("{SHIFT}+{HOME}");
for(int i=0; i<50; i++) {
inputKeys("{DELETE}");
}
表格对象查找:
//the first column is Order Id
int rowIndex = -1;
int columnIndex = 0;
String myOrderId = "junzaivip";
//get TestData from TestObject
ITestDataTable table = (ITestDataTable) toraf.getTable_listBluePage().getTestData("contents");
String cell = null;
//iterator all rows of TestDataTable
for(int i=0;i<table.getRowCount();i++){
cell = table.getCell(rowIndex, columnIndex).toString();
cell= (String)table.getCell(rowIndex, columnIndex).toString();
System.out.println(cell);
if(myOrderId.equals(cell)){
//get the target row, and break out of the loop
rowIndex = i;
break;
} else{
rowIndex++;
}
}