|
没发现QTP封装了删除行的方法,可以自己实现
给你写了一个函数 自己调试一下
intDelRowNum=3
intParameterCount=1
msgbox DelSpecifiedRow(intParameterCount,intDelRowNum)
Function DelSpecifiedRow(intParameterCount,intDelRowNum)
DelSpecifiedRow="Delete Fail"
If intParameterCount <>0 Then
Dim arrValue()
ReDim arrValue(intParameterCount-1)
datatable.SetCurrentRow intDelRowNum
For i=intDelRowNum to datatable.GetRowCount
datatable.SetNextRow
For k=1 to intParameterCount
arrValue(k-1)=datatable.RawValue(k,"Global")
Next
datatable.SetPrevRow
For k=1 to intParameterCount
datatable.Value(k,"Global")=arrValue(k-1)
Next
datatable.SetNextRow
Next
DelSpecifiedRow="Delete Successful"
End If
End Function |
|