Cannot obtain the window with the window class '#32770'...
Hi,
I'm calling function to validate a object which will popup a window if the value is inserted wrong. While validating the popup window I'm having trouble... below is the code
Function Validate_Month_Year
Set MainFrame = Sys.Process("iexplore", 2).Page("http://server/Default.asp").document.frames.Frame("mainFrame")
MainFrame.document.all.Item("gvSalesBudgetForecast_ctl02_ddlYear").ClickItem("2011")
If NOT Sys.Process("iexplore", 2).Window("#32770", "Message from webpage", 1).Exists Then
Log.Message "Month and Year were within project estimated start date"
Else
Sys.Process("iexplore", 2).Window("#32770", "Message from webpage", 1).Window("Button", "OK", 1).Click
Log.Error "Month and Year are NOT within project estimated start date, different Mon / Year is selected"
End If
End Function
In the above function, if I insert wrong value, the popup is shown and the function correctly clicks on ok button on the popup, but the problem is if I insert the correct value, there will not be popup shown, so the script is trying to search the popup which is NOT there and erroring out as "Cannot obtain the window with the window class '#32770' window caption 'message from webpage' and index 1"
How to make this work? Please help!!