摘要: 'Action1:'Give the print data proxySet fnGPrintData = GetRef("PrintData")Call GlobalFuncFunction PrintData(a,b)'Print data in some formatEnd Function'Global Library:Dim fnGPrintDataFunction GlobalFunc()Call fnGPrintData(4,5)End Function 阅读全文
posted @ 2012-09-06 15:34 dushuai 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 'Simulate typingSetting.WebPackage("ReplayType") = 2'Type some text into the search textboxBrowser("Google").Page("Google").WebEdit("q").Set "Tarun Lalwani"'Wait for 500 msecWait 0,500Dim oList'Get the suggestion list tableSet oList = 阅读全文
posted @ 2012-09-06 15:29 dushuai 阅读(151) 评论(0) 推荐(0) 编辑
摘要: '重写MsgboxFunction NewMsgbox(text)Print "Msgbox - " & textEnd FunctionDim ptrMsgBox, MsgBox'Get the reference to new functionSet ptrMsgBox = GetRef("NewMsgbox")'Override the message box nowSet MsgBox = ptrMsgBox'Now in every Action we just need to add two lines 阅读全文
posted @ 2012-09-06 14:01 dushuai 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Function GetTestObjectName(obj)GetTestObjectName = ""If IsNull(Obj) or IsEmpty(obj) Then Exit FunctionDim strObjectNamestrObjectName = obj.ToStringstrObjectName = Split(strObjectName, "")(1) & "(""" & Split(strObjectName, "")(0) & "& 阅读全文
posted @ 2012-09-06 09:01 dushuai 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 非Tab模式:Hwnd = Browser("X").object.HWNDWindow("hwnd:=" & hwnd).MaximizeTab模式:Dim hwndBrw, hwndWindowhwndBrw = Browser("Browser").GetROProperty("hwnd")Const GA_ROOT = 2'Declare Function GetAncestor Lib "user32.dll" (ByVal hwnd As Long, ByVal ga 阅读全文
posted @ 2012-09-06 08:54 dushuai 阅读(143) 评论(0) 推荐(0) 编辑