|
橙色标注的部分为增加或修改内容
RegisterUserFunc "WebEdit", "Type", "WebEditType", True
SystemUtil.Run "iexplore.exe" ,"www.weibo.com" '打开新浪微博
Browser("name:=新浪微博.*").Page("title:=新浪微博.*").WebEdit("html id:=loginname").Set "2"
wait 1
Browser("name:=新浪微博.*").Page("title:=新浪微博.*").WebEdit("html id:=password_text").Type "hi"
Browser("name:=新浪微博.*").Page("title:=新浪微博.*").WebCheckBox("html id:=remusrname").Set "OFF"
wait 1
Browser("name:=新浪微博.*").Page("title:=新浪微博.*").WebElement("html id:=login_submit_btn").Click
Public Function WebEditType(ByRef objWebEdit, ByRef strWords)
objWebEdit.Click
CreateObject("Wscript.Shell").SendKeys strWords
End Function |
|