Qtp+methods+get+a+free+blog+here+open+order

623 views

Published on

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
623
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
25
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Qtp+methods+get+a+free+blog+here+open+order

  1. 1. For more QTP Scripts, www.ramupalanki.comQTP MethodsActivate: It activates dialog boxes/WindowsSyntax: Object hierarchy. ActivateEx:Dialog(“Login”).ActivateWindow(“Flight Reservation”).ActivateClick Method: It clicks on an object (Buttons)Syntax: Object hierarchy. ClickEx:Dialog(“Login”).Winbutton(“ok”).clickClose Method: It closes the window,Dialog box, Browser window etc.Syntax: Object hierarchy. CloseEx:Window(“Flight Reservation”).CloseBrowser(“Browser”).CloseDblclick: It Double clicks the object.Set Method: It can be used in three ways.a. For setting the value of an edit boxSyntax: Object Hierarchy. SET “Value”Ex: Dialog (“Login”).WinEdit(“Agent Name”).Set “asdf”b. Selecting a Radio ButtonSyntax: Object Hierarchy. SetEx: Window("Flight Reservation").WinRadioButton("Business").Setc. Selecting/Deselecting check boxesSyntax:object Hierarchy.Set “ON/off”Ex: Window ("Flight Reservation"). Dialog("Open Order").WinCheckBox("Order No.").Set"ON"Select Method:It is used for selecting an item from a combo box or list box.Syntax: Object hierarchy.select “item”Ex:Window("Flight Reservation").WinComboBox("Fly From:").Select "London"Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "12572GetVisibletext: It returns Text from the specified area.Syntax: Variable =object hierarchy.getvisibletextEx:x=Window("Flight Reservation").WinComboBox("Fly From:").GetVisibleText
  2. 2. For more QTP Scripts, www.ramupalanki.commsgbox xGetRoproperty:It returns current object property value. It can be used for getting any object’s, any propertyvalue.Syntax: Variable = object hierarchy.getroproperty (“property name”)Ex: x=Window("Flight Reservation").WinEdit("Tickets:").GetROProperty ("width")msgbox xNavigate Method:It opens a specified URL in the Browser.Syntax: object hierarchy.navigate “URL”Ex: Browser("Yahoo!").Navigate http://www.google.co.in/Getitemscount: It returns number of items in a combobox.Syntax: Variable=object hierarchy.getitemscountEx: x=Window("Flight Reservation").WinComboBox("Fly From:").GetItemsCountmsgbox xGetcontent: It returns all items from a combobox.Syntax: variable=object hierarchy.GetContentEx: x=Window("Flight Reservation").WinComboBox("Fly From:").GetContentmsgbox xExist property: It checks whether the object is available or not.Syntax: Object hierarchy.exist(time in seconds)Ex: Window("Flight Reservation").Exist(5)

×