|
8#
楼主 |
发表于 2007-11-16 18:15:58
|
只看该作者
现在有个奇怪的问题
Set table1=Browser("COA").Page("COA").Frame("Frame_3").WbfGrid("ctl00_ContentPlaceHolder1_User")
deleteErrorRecord(table1)
Public sub deleteErrorRecord(table)
With table
Dim rCount
rCount=.RowCount-1
For i=2 to rCount
If .childitem(i,1,"WebElement",0).getRoproperty("background color")="#ff0000" Then
'If Browser("COA").Page("COA").Frame("Frame_3").WbfGrid("ctl00_ContentPlaceHolder1_User").childitem(i,1,"WebElement",0).getRoproperty("background color")="#ff0000" Then
.ClickCell i,1,2
Browser("COA").Dialog("Microsoft Internet Explorer").WinButton("OK").Click
i=i-1
rCount=rCount-1
wait 3
End If
Next
End with
End Sub
上面代码中,用红色的语句,当第二次满足条件时,这里就会出错,用蓝色的就不会!郁闷了半天 |
|