This is Ajay i have few douts if anybody know pls give me
reply.

1. i have opend 2 gmails i am working with 1 gmail i want
to close other gmail by usig script.

2.i have 10 links in a page all of them have same
properties& names i want to click on 5link by using script.

3.i have one combobox in that i want to see all the
citynames in the combobox and i have to check weather
hyderabad is present or not.

4. size of objectrepository.
5.what r problems we get during writing the script.
6.is it possible to compare to excel sheets in qtp if
possible wht is the script.
7.example for lowlevelrecording

Answer Posted / manas jena

litle bit modify of answer if u ur using browser object
then creation time property should user
1. 2 gmail opened
ans

Browser("title:=.*gmail.*" "creationtime:=1" ).close

The first opened browser creation time will be 0,next
opened browser creation time is 1.

See ordinal identifier in QTP

3. ans:

you can use

Index or location property

Index work on left to right and location works top to buttom

example

Text Box 1: Text Box 2:


Text Box 3: Text Box 4:

Text Box 1: location=0
Text Box 2: location=2
Text Box 3: location=1
Text Box 4: location=3

'Text Box 1
Browser("title:=.*Descriptive.*").Page
("micclass:=Page").WebEdit
("name:=dpTest","location:=0").Set "1"

'Text Box 3
Browser("title:=.*Descriptive.*").Page
("micclass:=Page").WebEdit
("name:=dpTest","location:=1").Set "2"

'Text Box 2
Browser("title:=.*Descriptive.*").Page
("micclass:=Page").WebEdit
("name:=dpTest","location:=2").Set "3"

'Text Box 4
Browser("title:=.*Descriptive.*").Page
("micclass:=Page").WebEdit
("name:=dpTest","location:=3").Set "4"
--------------------------------------------------
Text Box 1: index=0
Text Box 2: index=1
Text Box 3: index=2
Text Box 4: index=3


'Text Box 1
Browser("title:=.*Descriptive.*").Page
("micclass:=Page").WebEdit
("name:=dpTest", "index:=0").Set "1"

'Text Box 2
Browser("title:=.*Descriptive.*").Page
("micclass:=Page").WebEdit
("name:=dpTest", "index:=1").Set "2"

'Text Box 3
Browser("title:=.*Descriptive.*").Page
("micclass:=Page").WebEdit
("name:=dpTest", "index:=2").Set "3"

'Text Box 4
Browser("title:=.*Descriptive.*").Page
("micclass:=Page").WebEdit
("name:=dpTest", "index:=3").Set "4"

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain actions in qtp ?

546


Hi, Hope you viewers are doing fine with good health. What are the steps and connection parameters to connect to Oracle db ? Can you connect with just the Oracle client or Oracle XE ? Cheers!!

2434


hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]

1453


How qtp recognizes the object?

660


Explain Descriptive Programming Types with Examples?

917






Hi Friends... By using QTP , can we test .net products...and that product supports different languages.. thanx in advance..

4117


How many lines of code in each script of QTP?

4026


What will be happen if i load object repository at run time, but it has already associated.

1249


what type of framework u r using in ur organization

1638


If I change the object name in one action will it be updated in all the actions? Or not?

588


What are the disadvantages of recording test cases in qtp?

587


www.icici.com ,after this.. home page wll came, in this page what r the items we r going to test for manual and what are items we r going to test for QTP... explian clearly with example

1722


Through array we can execute the testcase how ? give me example

1391


i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?

1492


What are the general steps involved in the data driven framework?

544