How to click after finding an object
Hi All,
I need to perform some action after finding an object using Find, FindAll or FindChildren methods.
Can anyone please explain how to go about this?
Like click on the object after finding it using Find or FindAll methods.
I have gone through the smartbear website for find and findAll. But it didnt help.
I tried with this code:
def clickControlID():
TestedApps.Sound_PE.Run()
Delay(5000)
Login=Sys.Process("SoundPE").WinFormsObject("DialogLogin")
clkLogin=Login.FindAllChildren("WinFormsControlName","buttonOK",20)
clkLogin.Click()
I am getting the error for this code as:
'SafeArrayWrapper' object has no attribute 'Click'
clkLogin=Login.FindAllChildren("WinFormsControlName","buttonOK",20)
FindAllChildren() will return an array of objects.
Click() method can be performed only on single object.
You need to use Find() or FindChild() method or select appropriate object from the returned array.