Micro Focus QTP (UFT) Forums
How to do scripting if application contains 3rd party controls - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to do scripting if application contains 3rd party controls (/Thread-How-to-do-scripting-if-application-contains-3rd-party-controls)



How to do scripting if application contains 3rd party controls - nistalaramesh - 01-18-2010

I am using QTP 9.2 with Dot net Addin
In my application i have a Grid named Smart Property grid. This Grid is a Dot net grid control and a 3rd party control.
But if i spy the grid i am getting swf name path of the grid

I am getting the property as swf object only. Grid also displays list boxes for few of the rows
And QTP records script with mouse coordinates

Can anybody help me in this please.

Please look into the attached screen shot for this

QTP Recorded Script is as below

How can i proceed with QTP for this problem. Any other tool helps me in this

Code:
SwfWindow("ITKK.NET").SwfTreeView("tvITKKTree").Select "TRAINING - DO NOT USE;India;Auto-Customer-03/12/2009 11:50"
SwfWindow("ITKK.NET").SwfToolbar("SwfToolbar").ShowDropdown "New"
SwfWindow("ITKK.NET").SwfToolbar("SwfToolbar").Select "File;New;Piston Compressor"
SwfWindow("ITKK.NET").SwfToolbar("MenuStrip1").Select "File;New;Piston Compressor"
SwfWindow("ITKK.NET").SwfEdit("SwfEdit").Set "Auto Compressor"
SwfWindow("ITKK.NET").SwfObject("SwfObject_2").Click 360,334
SwfWindow("ITKK.NET").SwfObject("Unknown").Click 254,9
SwfWindow("ITKK.NET").SwfObject("SwfObject_2").SwfWindow("SwfWindow").SwfList("SwfList").Select "LMF"
SwfWindow("ITKK.NET").SwfObject("SwfObject_2").SwfWindow("SwfWindow").SwfList("SwfList").Type micReturn



RE: How to do scripting if application contains 3rd party controls - deepaksporty - 05-19-2011

Hi,

You can use some more features provided by QTP to recognize the object. Like Smart Identification or Ordinal Identifier.
if QTP puts an Object in swfObject or WinObject or WebObject then it means QTP is not able to map an object to a standard class. try for other options to recognize the object.

If these methods fail then you can contact HP
Thanks,
Deepak


Unable to select date from a datetime picker control - Elora - 09-10-2011

Hi,

I am scripting a .net window application.
How to set date for a date time picker control which is identified as a swfcalender but in the screen displaying as a dropdownbox.

Please note the syntax (setdate "9/10/2011") doesn't work.

Please suggest.


RE: How to do scripting if application contains 3rd party controls - jayanths - 11-16-2011

Hi Ramesh,
We faced a similar issue in one of our projects. The solution is to use Test Advantage, a third party add-in that helps QTP identify the dot net elements. with that add-in, the grid becomes recognied as swfgrid and the child objects under the grid as seperate panes . you can then mainpulate the object properties .
Thanks,
Jay
Hi Elora,
Try identifying the drop down boxes as seperate objects- one drop down for date, another for time, another for GMT and so on. Then use the entire parent object hierarchy to perfrom actions on that object like
Code:
swfwindow().swftable().swfcalendar().swflistbox().select 'item'
Hope this works.
Thanks,
Jay