How to click after finding an object
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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'
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try this,
def clickControlID():
TestedApps.Sound_PE.Run()
Delay(5000)
Login=Sys.Process("SoundPE").WinFormsObject("DialogLogin")
clkLogin=Login.FindAllChildren("WinFormsControlName","buttonOK",20)
Sys.HighlightObject(clkLogin)
let me know you are able to identify the object.
If you are able to highlight the object then you put a breakpoint on the Sys.HighlightObject(clkLogin) and add clkLogin in the watch list and see what is the properties you got.
Thanks
Shankar R
LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com
“You must expect great things from you, before you can do them”- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
