Forum Discussion

Desktopapptesti's avatar
Occasional Contributor
3 years ago

BtnOK is not responding on click

Hi Everyone, 

I am fairly new to TestComplete. So, I have the btnOK button  on a pop up window. The object is identified and mapped correctly. The button works when I click on it manually or through keyword testing but not through script testing. 


ButtonOK= NameMapping.Sys.NLS.dlgTransactionEntry.Window("Button", "OK", 6)
#if ButtonOK.Exists:
# ButtonOK.Keys("Space")
# ButtonOK.Keys("Enter")
# ButtonOK.ClickButton()
# else:
# Log.Message("button doesnt exists") 



transaction_okay_btn = Aliases.dlgTransactionEntry.btnOK
if (Aliases.dlgTransactionEntry.btnOK.WaitProperty("VisibleOnScreen", True, 2000)):
Log.Message("button is active")


I tried deleting the button and adding it again. To avoid any conflict.  I used Visibleonscreen and keys(enter)  as suggested in posts. Nothing works. Any suggestions would be appreciated. 


Thank you.

2 Replies