Dim sMainPage sMainPage=Aliases.browser.AuthPage Sub MainScript() 'calling the function from the main script blnUserAuthenticated=PageObjExists(sMainPage,"TitleAgencyLinkHome",5000) End Sub 'function in the functiona library Function PageObjExists(sPage,sObj,intTime) Dim objFound,i objFound=False i=0 Do While Not(sPage.Exists) And i<5 aqUtils.Delay (1000) If sPage.Exists Then 'log.Message "Page found in : "&i Exit Do End If i=i+1 Loop If sPage.Exists Then Log.Message "Page Found" If (sPage.WaitAliasChild(sObj,intTime).Exists) Then objFound=True PageObjExists=objFound Else PageObjExists=objFound End If Else Log.Error "PAGE NOT FOUND: "&sPage End If End Function