Anda di halaman 1dari 6

Share

More

Next Blog

Create Blog

Sign In

WORKING WITH QTP TESTEVERYTHING


ITS A L L A BOUT TESTING

PAGES
HOME QTP JMETER PERFORMANCE WEB /Miscellaneous SELENIUM

TEST AUTOMATION BOOKS

POST YOUR QUERIES

SEARCH......
Search

FOLLOW BY EMAIL
Email address... Submit

BLOG ARCHIVE
2012 (7) 2011 (42) December (2) October (2) September (2) August (1) July (3) June (12) May (10) QTP does not record the application Close All Browsers Except OLD One QTP VB Handle Popup Dialog window in Browser QTP

SATURDAY, 21 MAY 2011

DICTIONARY OBJECT IN QTP


Dictionary object is similar to a typical array. The difference between a dictionary object and an array is that there is a unique key associated with every item of dictionary object. This unique key can help you in calling that item as and whenever required. In arrays we store the values based upon the index i.e. 0,1,2 but here we can store the values based upon the names i.e. keys. Each value is stored corresponding to the unique keys. Dictionary object that stores data in key, item pairs. Dictionary objects are very useful when dealing with the large no of data. On an average they are 3 times faster then the collection objects Every key should be unique. Duplicate keys are not allowed. Dictionary object belong to "Scripting.Dictionary" class. To create a dictionary object we can use the following statement: REM Create a variable.
1/6

testeverythingqtp.blogspot.in/2011/05/dictionary-object-in-qtp.html

Compare bitmap file using QTP ( using Mercury.File... Execute() and Eval() statements in QTP Dictionary Object in QTP Launch QTP by VB Script Date Time Functions In Visual Basic / QTP Create ZiP file VB QTP / UnZip file VB QTP Scroll the page using QTP / Scroll bar handling April (10)

Dim objDict REM Create dictionary object Set objDict=CreateObject("Scripting.Dictionary") Following are the methods available with the Dictionary Objects: Add Method,Exists Method, Items Method, Keys Method, Remove Method, RemoveAll Method REM Adding keys and corresponding items. objDict.Add Company, TEST objDict.Add Name, Rajiv objDict.Add Blog, QTP

Using Exists Method to check whether the key 'Company' exists? If objDict.Exists(Company) Then msgbox Specified key exists.

SUBSCRIBE ME
Posts

Else msgbox Specified key doesnt exist. End If"

Comments Retrieve ALL items and keys respectively from inside dictionary object.

POPULAR POSTS
Get cell data from webtable / QTP Select the row in WEBTABLE/WEBGRID using QTP/DOM QTP Mercury DeviceReplay vs SendKeys/ Right click mouse Use Send Key Method QTP VB QTP is not recording the web application Use Regular Expressions QTP

REM Get the items. allItems = objDict.Items REM Get the keys. allkeys= objDict.Keys REM Iterate the array. For x = 0 To objDict.Count-1 msgbox allItems(x) & : & allkeys(x) Next Using Remove method objDict.Remove("Company") Now it will return false because we have deleted the key. msgbox objDict.Exists(Company) Using Remove all method to clear the dictionary REM Clear the dictionary.

testeverythingqtp.blogspot.in/2011/05/dictionary-object-in-qtp.html

2/6

Get Text Location / ClickOnText QTP VB Validation of Sorting in WEBTABLE / QTP VB Get All Web page text ( Including All Webelement ) Get Column Names of WebTable using QTP

objDict.RemoveAll
P O S T ED B Y R A J I V K UM A R NA NDV A NI A T SA TU RDA Y, M A Y 2 1 , 2 0 1 1

Recommend this on Google


LA B ELS : A RRA Y, DI CTI ON A RY OB JE CT

NO CO M M ENT S : P O S T A CO M M ENT

Etryu cmet. ne or omn..

VIEWS

Comment as: Google Account Publish Preview

6 6 5 9 9
LABELS
ADODB.Connection ADODB.Recordset (1) Array (1) (1)

LI NKS TO THI S P OS T Create a Link Newer Post Subscribe to: Post Comments (Atom) Home Older Post

Automation (1) Automation Tips (1) Basic UNIX Commands (1) Brow ser (1) Brow ser count (1) Checkbox (1) ChildItem (1)

ChildObject (2)
Custom

ClickOnText (1) CMD (1) Cookies (1)

CreateObject (3)
(2) Date .Time
(1)

firefox profile (1) data types (1)

Date

(1) Description.Create (1) Dictionary

Dev iceReplay

Obj ect (1) disable add-ons pop-up (1) DOS (1) Ev al (1) Execute (1)

Files FSO
Text (1)

(2) (2)

FileSystemObject (3)
Function
(1)

FindText (1) FirefoxDriv er (1)

(2)

Get

Location

GetCellData

Home QTP JMETER PERFORMANCE WEB /Miscellaneous SELENIUM

GetRow WithCellText (1) Jmeter (1) Launch QTP obj ect (1) (1) (1)

Mercury.FileCompare Obj ectProperties

ObjectRepository
Obj ectSpy (1)

(2)

QTP (2)
(1)

QTP 11
(1) 3/6

(3)

RegExp

Registry

testeverythingqtp.blogspot.in/2011/05/dictionary-object-in-qtp.html

RegularExpression (2)

Right (1)

Click (1) Security Cerificates

Selenium
SendKeys (3)

(4)
Sorting (1)

SSLCertificates (1) Threads (1) Time (1) VB Script (1) VBScript (1) Vi Linux Editor (1) Visual Relation

Identifiers (1) Wait (1)

Webdriver
(1)

(2)

Webdriv er2

(1) w ebpage

WebTable (3) WScript (3) ZiP/UnZip file VB QTP (1)

WORKING WITH QTP TESTEVERYTHIN G


Moving, Copying, and Deleting Files Working with files(FileSystemObject) / QTP Adding Data to the File Working with files(FileSystemObject) / QTP Creating Files Working with files(FileSystemObject) / QTP Validation of Sorting in WEBTABLE / QTP Read Value from Registory / QTP / WScript

AMAZON SEARCHBOX

testeverythingqtp.blogspot.in/2011/05/dictionary-object-in-qtp.html

4/6

Find us on Facebook Sign Up


Create an account or log in to see what your friends like.

Working with QTP TestEveryThing


Like

32 people like Working with QTP TestEveryThing.

Dasarathan

S ubhransu

H arsha

A mmu

V imal

Dattaprasad A shok F acebook social plugin

M ajeed

S udhakar

Krishna

Home QTP JMETER PERFORMANCE WEB /Miscellaneous SELENIUM RA JIV K UMA R NA NDV A NI. P OW E RE D B Y BLOGGER .

AMAZON CONTEXTUAL PRODUCT ADS

testeverythingqtp.blogspot.in/2011/05/dictionary-object-in-qtp.html

5/6

AMAZON MP3 CLIPS

HEALTH TIP OF THE DAY


Add Johannes Vermeer Art

Enroll in a class, such as ballroom dancing, yoga, or even pottery making.

WHICH ONE IS RIGHT ?


Browser(creationtime:=0).page("Google").Link("search").click Browser("Google").page("Google").Link("text:= search").click Browser("Google").page("name:=Goggle").Link("search").click Votes so far: 44 Poll closed 3 (6%) 35 (79%) 6 (13%)

testeverythingqtp.blogspot.in/2011/05/dictionary-object-in-qtp.html

6/6

Anda mungkin juga menyukai