RFT 实用CODE

来源:互联网 发布:舞蹈软件下载 编辑:程序博客网 时间:2024/04/20 03:47

删除文本框中内容:

inputKeys("{SHIFT}+{HOME}");for(int i=0; i<50; i++) {inputKeys("{DELETE}");}



表格对象查找:

//the first column is Order Idint 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 TestDataTablefor(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++;   }  }


原创粉丝点击