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
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 |
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 |
How do u write script in qtp? where do u write?
Explain abt the File System Object in QTP with ex
example-date format is 01-jan-09 in QTP.How to convert this format to 01-01-09?
Which MS Excel formulas are possible to use in the DataTable? I am searching a formula for searching a field in the datatable
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?
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)
what is the difference between data table and spread sheet?
What are objects? how do you select the unknow object?
Have you done batch testing in qtp? If yes how you are doing?
what is the defference between QTP 8.2 and 9.0and 9.2? plz tell me
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.
What is an Custom Object in QTP ?