Hello Friends, we are automating an application using .NET add ins with QTP9.2.
I am facing trouble to recognize and click the links under navigation bar. There are 7 links present under navigaton bar and whole set is recognized as a single unit. The object is recognized as
Swfwindow("swfname:=MainFrameworkWindow").SwfObjec t(swftypename:=DevExpress.XtraNavBar.NavBarControl ")
I went through the forum but i did not get any info related to this. So can you suggest any work around on this to Identify the Individual links and to select.
Tarun,i did a work around on the same finally i have a fruits to eat but i feel it is not a sweetish to consume.I made the XtraNavBar controls to recognize through the co-ordiante level
to click on the required item. Finally i feel if the window is moved/resolution changes the function will fail.
So friends can you add few comments for the same.
Try implementing a CustomServer for the DevExpress.XtraEditors.NavBarControl. Pass the name of the link as a string input parameter to a replay method. Seach the collection of itemlinks for a match. When/if one is found, get the bounds of the itemlink and use the QTP Click method to click in the middle of the item.
Hi. Try the following code to click the link. It works for DevExpress.XtraNavBar version 8.2.
Set obj_NavBar = "your NavBarControl object"
ItemsCount = obj_NavBar.object.Items.count
For i=0 to ItemsCount-1
sCaption = obj_NavBar.object.Items.Item(i).Links.Item(0).capt ion
If sCaption = sLink Then
Set obj_Link=obj_NavBar.object.Items.Item(i).Links.Ite m(0)