With Browser("发表页")
Set oLink = Description.Create()
oLink("micClass").value = "Link"
Set oLinks =.Page("管理页-草稿").WebElement("草稿列表箱").ChildObjects(oLink)
NumofLink = oLinks.Count
msgbox NumofLink
For i = 0 to NumofLink -1
linkName = oLinks(i).GetRoProperty("innertext")
print linkName
flag = 0
If linkName = blogName Then
flag = flag +1
'如果博文在草稿箱中存在,就点击“编辑”按钮
oLinks(i+1).Click
Exit for
End If
Next
Set oLinks = Nothing
Set oLink = Nothing
谢谢大侠指点。能不能具体的写一下,我对函数没啥概念。十分感谢作者: 踏雪飞狐 时间: 2012-11-6 10:10
Function A (oPageOrWebObj , oChildObjsDesc )
With Browser("发表页")
Set oLink = Description.Create()
oLink("micClass").value = "Link"
Set oLinks =.Page("oPageOrWebObj ").WebElement("oChildObjsDesc").ChildObjects(oLink)
NumofLink = oLinks.Count
msgbox NumofLink
For i = 0 to NumofLink -1
linkName = oLinks(i).GetRoProperty("innertext")
print linkName
flag = 0
If linkName = blogName Then
flag = flag +1
'如果博文在草稿箱中存在,就点击“编辑”按钮
oLinks(i+1).Click
Exit for
End If
Next
Set oLinks = Nothing
Set oLink = Nothing