Trying to click a link- There was an attempt to perform an action on a zero-sized window.
Hi,
I'm trying to click a link, not sure why i'm getting this error, could this be a reason because VisibleOnScreenis set to False?
Below is my Code:
Function CheckObjectExist(sPage,arrProp,arrVal)
Set myObj=sPage.FindChild(arrProp,arrVal,50)
i=0
Do While Not (myObj.Exists) and i<5
aqUtils.Delay(1000)
Set myObj=sPage.FindChild(arrProp,arrVal,50)
i=i+1
Loop
If (myObj.Exists) Then
Set CheckObjectExist=myObj
Else
log.Error "Object is not Found"
End If
End Function
,calling this function from another function
Function ClickNewQuote
Set sPage=Aliases.browser.MainPage
LinkCreateNewQuoteProp=Array("namePropStr","ObjectIdentifier","ObjectType")
LinkCreateNewQuotePropVal=Array("Login","LinkAnchor","Link")
Set LinkCreateNewQuote=CheckObjectExist(sPage,LinkCreateNewQuoteProp,LinkCreateNewQuotePropVal)
If (LinkCreateNewQuote.exists) Then
log.Message"objectfound"
LinkCreateNewQuote.Click
End If
End Function
' any help would be highly appreciated,, pls see the screen shot