07-08-2011, 03:09 PM
Below mentioned script is in Testcase file(.xls file)
Component Browser Page Object ObjectName Action Parameter
Web An inspiring place to An inspiring place to WebFile Story_Image Set C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Winter.jpg
Web An inspiring place to Choose File to Upload WinButton Open Click
In library file contains
Component Browser Page Object ObjectName Action Parameter
Web An inspiring place to An inspiring place to WebFile Story_Image Set C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Winter.jpg
Web An inspiring place to Choose File to Upload WinButton Open Click
In library file contains
Code:
Public function fnFile(WebBrowserDesc,WebPageDesc,WebFileDesc,strAction,strParam,strExpected,strChkPoint)
Select Case strAction
'Set Value
Case "Set"
Browser(WebBrowserDesc).Page(WebPageDesc).WebFile(WebFileDesc).Set strParam
End Select
End Function
Code:
Public function fnWinButton(WebBrowserDesc,WebDialogDesc,WinButtonDesc,strAction,strParam,strExpected,strChkPoint)
Select Case strAction
'Click Button
Case "Click"
Browser(WebBrowserDesc).Dialog(WebDialogDesc).WinButton(WInButtonDesc).Click
End Select
End Function