Micro Focus QTP (UFT) Forums
Unable to right click column header - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Unable to right click column header (/Thread-Unable-to-right-click-column-header)



Unable to right click column header - sudhirzpatil - 07-15-2013

Unable to right click on column header.

When click , it records the action on the column header as

Code:
SwfWindow("abc").SwfWindow("pqr").SwfTable("gridControl").SelectColumn "columnName"

but when righjt click on above column header, its not recorded.

Note- This is Devx control.Keyboard event( Right click key) does not get work onht this grid.

by Mouse right click, the Menu get display and records following action in QTP


Code:
SwfWindow("abc").SwfWindow("pqr").SwfTable("gridControl").WinMenu("ContextMenu").Select "<Item 9>"

can any one has workaround for this.

Using following statment, i am able to find the Column header name

Code:
SwfTable(table).GetCellProperty(0,<columnNo>,"colname")
...is this useful ?


RE: Unable to right click column header - basanth27 - 07-16-2013

It is not useful until you learn to present yourself in a appealing manner. Please include your code inbetween the code tags. That formats it well and is very easy for anyone to understand Smile
Secondly, Is the issue with the right click or that you want the name of the column header?
If there are no methods to right click for the defined object you could use "SendKeys" or "Device Replay". Both these objects have the ability to use the mouse interrupt to click on the respective object provided you specify the co-ordinates.
Research more about the two and you will learn more.


RE: Unable to right click column header - sudhirzpatil - 07-16-2013

suree basanth, will take care this.

Regarding your solution, i tried with Device replay, but still it does not work. Because, when spy it just showthe object untill Gridview and not its Column Header.
yes, once the co-ordinates get , i can use the Device Replay.
But didnt know how to find the object ( here column header )


RE: Unable to right click column header - basanth27 - 07-16-2013

There should be a inherent object which specifies the Column Header? Do you think dev team maybe able to help you with respect to the object description?
There is also a dotnetfactory which is an extensibility for .Net Objects. Maybe that may help?


RE: Unable to right click column header - sudhirzpatil - 07-18-2013

Hi basanth, discussed with Dev, they have used .Columns property to locate the column header.But here QTP doesn support this. Will you pls let us know how to find the co ordinates of the column header ?