小复习 之 遍历页面 链接 找到目标链接 并点击进入 (7月6日)
上一篇 /
下一篇 2013-07-06 23:14:22
/ 个人分类:自动化资料
51Testing软件测试网+O#NIU,}Kr!C
Set object_link=description.Create()
object_link("micclass").value="Link"
2J*Y#|k%i(J@0
Set links=Browser("
百度一下,你就知道").Page("百度一下,你就知道").ChildObjects(object_link)
51Testing软件测试网5tEfY"LO]y)b6m4d
a=links.count()
51Testing软件测试网)Q'zY3Q.A#B
For i =0 to a-1
51Testing软件测试网$^"W!k[lt
51Testing软件测试网8K
ms
[ O7I`
n= links(i).getroproperty("name")
51Testing软件测试网7~xj @ dh1d3S
If n="百科" Then
set b=links(i)
z9y/j-F1L1m@Ang/x0
'msgbox b.getroprpperty("innertext")
51Testing软件测试网Xn;{]!Hh
b.click
NJt4Rl:W*W0
Exit for
51Testing软件测试网(P!e/HRu
End If
Next
9RJY*CRA4\5o*Z0
wait(5)
51Testing软件测试网/{.X%Tc9|;g0fp8G-R
SystemUtil.CloseProcessByName("iexplore.exe")
收藏
举报
TAG: