Google Auto suggest box自动化

'Simulate typing

Setting.WebPackage("ReplayType") = 2

'Type some text into the search textbox

Browser("Google").Page("Google").WebEdit("q").Set "Tarun Lalwani"

'Wait for 500 msec

Wait 0,500

Dim oList

'Get the suggestion list table

Set oList = Browser("Google").Page("Google").WebTable("html tag:=TABLE", "class:=gac_m").Object

'Get the text of the 3rd item

Print "Item at 3rd position is - " & oList.rows(2).outerText

oList.rows(2).click

posted @ 2012-09-06 15:29  dushuai  阅读(151)  评论(0编辑  收藏  举报