03-25-2008, 02:59 PM
Hi,
The issue I am facing is about a pop up having an OK button with same title in different windows, i.e. for ex:
I would like to write a function that would take two parameters as input, say WinType for Window/SwfWindow and another parameter as WinName for Window1/AnotherWindow and the operation to be performed in the function is .Click
The following Run Time Error is displayed:
Object Required: 'WinTypeName'
Appreciate any help on the above or on handling pop up across different windows.
Thank You for reading,
Vamseekk
The issue I am facing is about a pop up having an OK button with same title in different windows, i.e. for ex:
Code:
Window("Window1").Dialog("My Dialog").WinButton("OK")
SwfWindow("AnotherWindow").Dialog("My Dialog").WinButton("OK")
I would like to write a function that would take two parameters as input, say WinType for Window/SwfWindow and another parameter as WinName for Window1/AnotherWindow and the operation to be performed in the function is .Click
Code:
Call Save ("SwfWindow","AnotherWindow")
Public Function Save(WinType, WinName)
WinTypeName = WinType & "(" & chr(34) & WinName & chr(34) & ")"
' WinTypeName = SwfWindow("AnotherWindow")
WinTypeName.Dialog("My Dialog").WinButton("OK").Click
End Function
The following Run Time Error is displayed:
Object Required: 'WinTypeName'
Appreciate any help on the above or on handling pop up across different windows.
Thank You for reading,
Vamseekk