|
Function GetCalculateNode()
Dim i
i = 1
Set PlusCollection = GetPlusCollection()
NumberOfPlus = PlusCollection.Count
Do
LastNum = GetReportNum()
minusNum = GetMinusNum()
CurrentCnt = unClickPlusNum + minusNum
TxtOfPlus= GetTxt(i)
If InStr(1,UnExpandNodeNameList,TxtOfPlus,1)=0 Then
PlusCollection(unClickPlusNum).Click
CurrentNum = GetReportNum()
If CurrentNum>LastNum Then
Call CalculateReports(LastNum,CurrentNum)
i = i + CurrentNum-LastNum
End If
else
unClickPlusNum = unClickPlusNum + 1
End If
Set PlusCollection = GetPlusCollection()
NumberOfPlus = PlusCollection.Count
i = i +1
Loop Until CurrentCnt = NumberOfPlus
End Function
当i= 4,理论上是 【卫统1—7表】 前面的加号,但是却点击了【卫统1—6表】前的加号;
也就是说,使用childobjects获取到的对象集合,不一定是页面上从上到下的顺序排列的
这样的情况怎么办才好? 使用dom方法吗?
[ 本帖最后由 FLY000 于 2010-9-16 16:32 编辑 ] |
|