QTP 11 Software

QTP 11 Software
Dear Professionals,

Latest Version of the QTP is:  QTP 11.00
Trail period is: 30 Days
 If you want to download and use, it takes more time and efforts, in order to reduce the cost and efforts, we downloaded and extracted the Software and planned to provide with free of cost.
G C Reddy Class Room Training Old Students and Others can use this opportunity.
You just pay DVD cost of 20 (Twenty) Rs. And get QTP 11.00 Software (Trial Version).
This facility available from September 1st 2011 onwards.
All G C Reddy group members can use this facility.
Note: DVDs are Available in Hyderabad location only; other locations people can get DVD’s through Courier.
Contact: Mr. Mani Maran
Mobile: 91- 9160663931
Address:
  • Plot No: 47, above Indian Bank
  • Near Image Hospital,
  • Madhapur, HI-TECH City,
  • Hyderabad-500081,
  • Andhra Pradesh, India.
------------------
Directions:
Madhapur (Hi-Tech City) Image Hospital Lane,
Take first Right, you can find Indian Bank
Above Indian Bank (1st floor),
You can get Software DVDs.
Thanks
Hari Prasad
(Technical Assistant to Mr. G C Reddy)
-----------------------------------------------------------------------------------
---------------------------------------------------------------------
 File System Operations
----------------------------------------------------------------------
'Create a Folder
Dim objFso
Set objFso=CreateObject("Scripting.FileSystemObject")
objFso.CreateFolder "C:\Documents and Settings\Administrator\Desktop\QTP"
Set objFso=Nothing 'Releasing the Memory

---------------------------------------------
'Check the existence of the Folder, If Not exists then Create the Folder
Dim objFso, FolderPath
FolderPath="C:\Documents and Settings\Administrator\Desktop\QTP"
Set objFso=CreateObject("Scripting.FileSystemObject")

If Not objFso.FolderExists(FolderPath) Then
    objFso.CreateFolder (FolderPath)
End If
Set objFso=Nothing
----------------------------------------------------
'Copy a Folder
Dim objFso, FolderPath
FolderPath="C:\Documents and Settings\Administrator\Desktop\QTP"
Set objFso=CreateObject("Scripting.FileSystemObject")
objFso.CopyFolder FolderPath,"E:\QTPx"

Set objFso=Nothing
---------------------------------------------------

'Delete a Folder
Dim objFso
Set objFso=CreateObject("Scripting.FileSystemObject")
objFso.DeleteFolder "C:\Documents and Settings\Administrator\Desktop\QTP"

Set objFso=Nothing
----------------------------------------------------------------
'Check the existence of the Folder, If Exists then Delete the Folder
Dim objFso
Set objFso=CreateObject("Scripting.FileSystemObject")

If objFso.FolderExists("C:\Documents and Settings\Administrator\Desktop\QTP")  Then
    objFso.DeleteFolder "C:\Documents and Settings\Administrator\Desktop\QTP"
End If

Set objFso=Nothing
----------------------------------------------------------------------
'Create a Text/Flat File
Dim objFso
Set objFso=CreateObject("Scripting.FileSystemObject")
objFso.CreateTextFile "C:\Documents and Settings\Administrator\Desktop\QTP.txt"
objFso.CreateTextFile "C:\Documents and Settings\Administrator\Desktop\QTP.doc"
objFso.CreateTextFile "C:\Documents and Settings\Administrator\Desktop\QTP.xls"
objFso.CreateTextFile "C:\Documents and Settings\Administrator\Desktop\QTP.pdf"
Set objFso=Nothing
------------------------------------------------------------------------------

'Read a Text file Char by Char
Dim objFso, objTextstream, myChar
'Creating File System Object
Set objFso=CreateObject("Scripting.FileSystemObject")
'Creating Text Stream Object
Set objTextstream=objFso.OpenTextFile ("C:\Documents and Settings\Administrator\Desktop\qtp.txt",1) '1 for Read, 2 for Write, 8 for Append
Do Until objTextstream.AtEndOfStream
myChar=objTextstream.Read(1)
Msgbox myChar
Loop

objTextstream.Close 'internal closing of the file
Set objTextstream=Nothing
Set objFso=Nothing

--------------------------------------------------------
'Read a Text file Line by Line
Dim objFso, objTextstream, myLine
'Creating File System Object
Set objFso=CreateObject("Scripting.FileSystemObject")
'Creating Text Stream Object
Set objTextstream=objFso.OpenTextFile ("C:\Documents and Settings\Administrator\Desktop\qtp.txt")

Do While objTextstream.AtEndOfStream =False
myLine=objTextstream.ReadLine
Msgbox myLine
Loop

objTextstream.Close
Set objTextstream=Nothing
Set objFso=Nothing
------------------------------------------------------------------------
'Read a Text file and Count Lines
Dim objFso, objTextstream, myLine, Counter
Set objFso=CreateObject("Scripting.FileSystemObject")
Set objTextstream=objFso.OpenTextFile ("C:\Documents and Settings\Administrator\Desktop\qtp.txt")

Counter=0
Do While objTextstream.AtEndOfStream =False
myLine=objTextstream.ReadLine
Counter=Counter+1
Loop
Msgbox Counter
objTextstream.Close
Set objTextstream=Nothing
Set objFso=Nothing
---------------------------------------------------------------------------
'Read a Text file
Dim objFso, objTextstream, myContent
Set objFso=CreateObject("Scripting.FileSystemObject")
Set objTextstream=objFso.OpenTextFile ("C:\Documents and Settings\Administrator\Desktop\AugustBatch.txt")

Do While objTextstream.AtEndOfStream =False
myContent=objTextstream.ReadAll
Print myContent
Loop
objTextstream.Close
Set objTextstream=Nothing
Set objFso=Nothing
----------------------------------------------------------------
'Read a Text file and Perform data driven testing for Login Operation
Dim objFso, objTextstream, myLine, myField
Set objFso=CreateObject("Scripting.FileSystemobject")
Set objTextstream=objFso.OpenTextFile ("C:\Documents and Settings\Administrator\Desktop\QTP.txt")

objTextstream.SkipLine
While objTextstream.AtEndOfStream=False
myLine=objTextstream.ReadLine
myField=Split(myLine,",")

SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set myField(0)
Dialog("Login").WinEdit("Password:").Set myField(1)
Wait 1
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").Close
Wend

objTextstream.Close
Set objTextstream=Nothing
Set objFso=Nothing
------------------------------------------------
'Read a Text file and Perform data driven testing for Login Operation
Dim objFso, objTextstream, myLine, myField
Set objFso=CreateObject("Scripting.FileSystemobject")
Set objTextstream=objFso.OpenTextFile ("C:\Documents and Settings\Administrator\Desktop\QTP.txt")

Do Until objTextstream.AtEndOfStream
Line_Count=objTextstream.ReadLine
Counter=Counter+1

If  Counter>=3 And  Counter <=7 Then
        myField=Split(Line_Count,",")
   
    SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
    Dialog("Login").Activate
    Dialog("Login").WinEdit("Agent Name:").Set myField(0)
    Dialog("Login").WinEdit("Password:").Set myField(1)
    Wait 1
    Dialog("Login").WinButton("OK").Click
    Window("Flight Reservation").Close
    End If
Loop

objTextstream.Close
Set objTextstream=Nothing
Set objFso=Nothing
-----------------------------------------------------------------------
'Write Data to a Text file
Dim objFso, objTextstream, num1, num2, res
num1=10 : num2=23 : res=num1+num2
Set objFso=CreateObject("Scripting.FileSystemobject")
Set objTextstream=objFso.OpenTextFile ("C:\Documents and Settings\Administrator\Desktop\QTP.txt",8)
objTextstream.Write "Addition of num1, num2 is: "&res
objTextstream.Close
Set objTextstream=Nothing
Set objFso=Nothing
-------------------------------------------------------
'Capture Button names from Login Dialog and export to a Text File
Dim objFso, objTextstream
Dim oButton, Buttons, i

Set objFso=CreateObject("Scripting.FileSystemobject")
Set objTextstream=objFso.OpenTextFile ("C:\Documents and Settings\Administrator\Desktop\QTP.txt",2)

Set oButton=Description.Create
oButton("Class Name").Value="WinButton"
Set Buttons=Dialog("text:=Login").ChildObjects(oButton)
objTextstream.WriteLine "Button Names"
objTextstream.WriteLine "----------"

For i= 0 to Buttons.Count-1 Step 1
myButton=Buttons(i).GetRoProperty("text")
objTextstream.WriteLine myButton
Next

objTextstream.Close
Set objTextstream=Nothing
Set objFso=Nothing
-----------------------------------------------------------------------

0 comments:

Post a Comment