Having trouble clicking correct item on SwfToolbar with UFT
Question ID: 107675
9
0

We have an SwfToolbar in our .Net application that has several icons on it that take you to different sections of the application. I need to figure out how to click a specific icon.

Marked as spam
Posted by (Questions: 387, Answers: 66)
Asked on June 9, 2017 9:21 pm
338 views
Answers (1)
9
Private answer

I have worked with a .NET based application before with a SwfToolbar object.

You need to get into the properties of the SwfToolbar and find the different Properties and Collections that may be contained there. One property (if present) to look at is ''CommandHolder'', and/or also the ''CommandLinks''. This will give you a listing of the associated command objects to that parent.

In my case I use this to pick apart the Menubar area/object I have in my application. My statement would look like:

iMenuCnt = .SwfObject(''swfname:=formMenu'').Object.CommandHolder.Commands.count
sInfo = ''Total Number of Menu Items = '' & iMenuCnt
For Cnt = 0 to iMenuCnt -1
sText = .SwfObject(''formMenu'').Object.CommandHolder.Commands.Item(Cnt).Text
sEnabled = .SwfObject(''formMenu'').Object.CommandHolder.Commands.Item(Cnt).Enabled
sInfo = sInfo & ''Menu Item: '' & sText & '' , Enabled Status: '' & sEnabled & vbCRLF
Next

(There's a 'With' statement block around it with the main window (SwfWindow) as the reference, and the Cnt is part of a loop that provides the index value in the collection to get the 'Text' information from.)

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on June 9, 2017 9:27 pm
0
Hi Michaeldx, Morning!! I am having an issue to identify the objects lower level, where I tried the above, still having an issue. My form contain as the attached and unable to fetch the members. Please help me. Thanks, Chandra.
( at December 7, 2020 6:57 am)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top