|
'******************************************************************
'table:想要计算的WebTable对象。例:table = Browser("CreationTime:=0").Page("Index:=").WebTable("index:=1")
'col:第几列。例:col = 6
'price:要比较的值。例:price = 2.01
'******************************************************************
Function CheckTablePrice(table,col,price)
Dim tempValue
For j = 2 to table.RowCount
v = table.GetCellData(j,col)
If isnumeric(v) Then
tempValue = tempValue + v
End If
Exit For
Next
If price = tempValue Then
Reporter.ReportEvent micPass, "Table Price Check", " table price is " & tempValue & ", check price is " & price
Else
Reporter.ReportEvent micFail, "Table Price Check", " table price is " & tempValue & ", check price is " & price
End If
End Function
这个我写完了没有跑过,你可以试试看。 |
|