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 can we close all webbrowsers which are opened in out desktop?

3 Answers  


OR is full with objects but i want to add 5 more objects,but i tried merging files,shared mode and descriptive ,iwont work.is there any alternative for that

6 Answers   CTS,


What is object & properties (in QTP)

5 Answers   Ordain Solutions,


What are the types of properties that quick test learns while recording?

0 Answers  


How do we count the no of mails in Yahoo Inbox for a specified week?

0 Answers  


How to retrieve particular cell data in excel sheet ?without importing method.

3 Answers  


What will be the script for recovery scenerio.plzanyone give ans with aexample related to banking project

2 Answers   Yahoo,


How many types of recording modes in qtp? Describe each type with an example where we use them?

0 Answers  


Hello Friends, I am working with QTP 9.2 descriptive programming. Can you please let me know how to work with below. Browser is IE, for my site, it opens another page with different browser name, For example Parent Page is google.com and child page is inteview questions. How to work with this second page.

3 Answers  


How to run a script from lines 50 - 100 alone (if the script has 1- 200 lines of code)?

6 Answers  


What is meant by virtual obj and Y do v need virtual obj configuration.

4 Answers  


what is the difference between data table and spread sheet?

1 Answers  


Categories