1) How will you associate SOR in Runtime? ( u had written 10
lines of code from 11th line u want associate what code u
will write)
2) How will close n number of browser expect only one which
is has to test? ( First tell me how will you identify how
many browser are opened ) what logic u will use?
3) In web Table u want to click on link ( Link Name Mohamed
) you dont know in which row and column that link is there.
how wil u identify and click on that link.

Answers were Sorted based on User's Feedback



1) How will you associate SOR in Runtime? ( u had written 10 lines of code from 11th line u want as..

Answer / prasant87

1)Write the below code after line 10 -

RepositoriesCollection.Add ("C:\Test\ObjRes.tsr")

2)Please some one tell the logic. I do not know:(

3. Capture the link property and write the code to click on that.

Is This Answer Correct ?    1 Yes 0 No

1) How will you associate SOR in Runtime? ( u had written 10 lines of code from 11th line u want as..

Answer / prathyusha

We can go for descriptive programming to get the collection of browsers.

set obrowser=description.create
obrowser.add "micclass","Browser"
set obrowsercol=Desktop.childobjects(obrowser)
msgbox obrowsercol.count

from this we can get to know howmany browsers are opened.

if you don't want to close particular browser we can get the name of the browser using getroproperty("name") then we can match that browser with expected one then we can close remaining browsers.
set obrowser=description.create
obrowser.add "micclass","Browser"
set obrowsercol=Desktop.childobjects(obrowser)
for i=0 to obrowsercol.count-1
browsername=browser.getroproperty("name")
if browsername <> "Google" then
obrowsercol(i).close
end if

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

How do u write script in qtp? where do u write?

2 Answers  


Explain abt the File System Object in QTP with ex

3 Answers   Ordain Solutions,


example-date format is 01-jan-09 in QTP.How to convert this format to 01-01-09?

9 Answers   Tech Mahindra,


Which MS Excel formulas are possible to use in the DataTable? I am searching a formula for searching a field in the datatable

3 Answers   HP,


with out object repository i need to launch IE and then navigate to a login page and then operate the objects within the page. How will be the script?

3 Answers   Ordain Solutions,






Please explain me i am using QTP 9.5 ,i am creating re usable scripts,i have to pass data from one local sheet to another local sheet.for example i am creating emploee information, (data is in action 2 local sheet),In this data table emplyeee number will get,i have to pass employee number to another reusable script search data (action2 local data sheet)

2 Answers  


what is the difference between data table and spread sheet?

1 Answers  


What are objects? how do you select the unknow object?

3 Answers  


Have you done batch testing in qtp? If yes how you are doing?

0 Answers  


what is the defference between QTP 8.2 and 9.0and 9.2? plz tell me

6 Answers  


Is it possible to change the name of a test object. I mean when we are recording the script for an object (for Ex: Username is a text field which has value "Babu",i am recording that). Then the Name of the object will become "Babu" in object repository. If i want to change "babu" as "xxxxx" .. is it possible to do? Pls help me in this .. if you didn't understand the question, pls let me know.

4 Answers  


What is an Custom Object in QTP ?

1 Answers  


Categories