If DataTable.Value( “LocalDataFilePath”, “DataPath”) > “0” ThenįilePath= DataTable.Value( “LocalDataFilePath”, “DataPath”) If DataTable.Value( “ScriptName”, “DataPath”)=Environment.Value( “TestName”) Then ”’Move the ” SetUp.xls ” file to My Documents for Xp or Documents for DocumentsĭataTable.ImportSheet XpPath& “SetUp.xls” , “DataPath”, “DataPath”ĭataTable.ImportSheet Win7Path& “SetUp.xls” , “DataPath”, “DataPath”
![qtp uft tutorial qtp uft tutorial](http://www.softwaretestingclass.com/wp-content/uploads/2014/04/UFT-QTP-Solution-Explorer-Pane.png)
”’LocalDataFilePath: C:\Users\userid\Documents\AppData\Automation_Data\ ”’Download the SetUp.xls File From Quality Center (ALM) ”’To use this Function You have to Use a SetUp.xls File –TableName = SheetName– ”’Save Runtime Data in Documents Folder as a Excel formatĭataTable.ExportSheet XpPath&FileName& “.xls”, TableNameĭataTable.ExportSheet Win7Path&FileName& “.xls”, TableNameĭataTable.ExportSheet “C:\Documents and Settings\”& UserID & “\My Documents\”&FileName& “.xls”, TableNameĭataTable.ExportSheet “C:\Users\”& UserID & “\Documents\”&FileName& “.xls”, TableName ”’Export RunTime Data to Documents Folder –TableName = SheetName–
![qtp uft tutorial qtp uft tutorial](https://i.ytimg.com/vi/bsUWIhv86gY/hqdefault.jpg)
SystemUtil.CloseProcessByName( “Excel.exe”)ĭataTable.ImportSheet ExcelPath, TableName, TableName If FilePath = “” Then ”’If Local Data path not DefineĮxcelPath=( “ Resources\QTP Resources\AppDAT\”& FileName) ”’Import data from Local or from QC at RunTime –TableName = SheetName– Win7Path = WshShell.ExpandEnvironmentStrings ( “%USERPROFILE%”) & “\Documents\” ”Current loged on Profile ‘Win7Path = “C:\Users\”& Environment.Value(“UserName”) &”\Documents\” ”User Profile XpPath = “C:\Documents and Settings\”& Environment.Value( “UserName”) & “\My Documents\” Set WshShell = CreateObject ( “WScript.Shell”) Tagged Action template Automation QTP UFT Comments No Comments on QTP\UFT: Action template QTP\UFT: Action template Parameter( “newUserLastName”) = DataTable.Value( “LastName”,addNewUser) ”Return Output Parameter “newUserLastName” PbWindow( “w_Pb_frame”).PbWindow( “w_Pb_frame”).PbDataWindow( “dw_window”).SetCellData “#1”, “lastname”,DataTable.Value( “LastName”,addNewUser) ”# Select a Power Builder Cell that match from QTP/UFT Runtime Data Table IdNum = trim(PbWindow( “w_Pb_frame”).PbWindow( “w_Pb_frame”).PbDataWindow( “dw_window”).GetCellData ( 1, 1)) RunAction “openApp ”, oneIteration, Parameter( “inputParameter”) PbWindow( “w_Pb_frame”).PbEdit( “Pb_edit”).SetSecure enterPinNumber ”#Create Action (Action1) Parameter “enterPinNumber” Tagged Action Parameter Input Parameter Output Parameter QTP Test Parameter UFT Comments No Comments on QTP/UFT: Input and Output Parameter QTP/UFT: Input and Output Parameter
![qtp uft tutorial qtp uft tutorial](https://i.ytimg.com/vi/mjOMPLW5rRA/maxresdefault.jpg)
![qtp uft tutorial qtp uft tutorial](https://i.ytimg.com/vi/JMuZ4Ix-JyA/maxresdefault.jpg)
SerialNumber = trim( Right(treeSelection, 5)) ”Last 5 digits from RightĬJulianDay = right(CalculateJulianDate( Date), 3)ĪddStrNumber = Code + cJulianDay + serialNumber TreeSelection = PbWindow( “w_Pb_frame”).PbWindow( “w_Pb_frame”).PbTreeView( “Pb_TreeView”).GetROProperty ( “selection”) JDay = DateDiff( “d”, Cdate(jFirstDayOfYear), Cdate(jDate)) + 1 ” # Use Date for currentDate or any date like “” #įunction CalculateJulianDate( ByVal jDate)ĭim jYear,jFirstDayOfYear,jDay,JulianDate NewDateYear = DateAdd( “yyyy”, 3,currentDate) The recent study( Click here) concluded that UFT as #2 best automation testing tool among all automation tools and secured the #1 spot among Commercial testing tools.Dim currentDateTime, currentDate, currentTime, newDateYear HP Unified Functional Testing Tool (formerly known as QTP) is widely used functional testing tool, In this tutorial series, We will walk you through the basic & advanced features of UFT, Implementation of Hybrid framework, UFT integration with ALM and Jenkins, Real time scripting challenges, Deep dive on each feature of UFT etc.