How should i get name of the screen?
Ex:There is a "submit" button.If i clicked on the submit
button it opens a screen. I want that screen name.How can i
get that screen name
I dont have any property regarding that screen.
If suppose we cliked on the screen , Then QTP captures the
screen properties
then i can get the screen name by using GETROPROPERTY
But i want the screen name without clicking the screen.
("I am using the "settoproperty" for Second screen by using
fist screen properties")
Please tell me anyone

Answer Posted / guest

Hello Art...

I got your answer... Your answer is good but it is not
correct for this question

Question is... Click on Submit Button... One window or
dialogbox will open... we should not active that window...
We have to get the Window/dialogbox name through scripting..

If we use Object spy it will provide you every thing but in
interviews they don't ask in that manner.

I try to give the answer here...

First of all Click on Submit button... then get the no. of
windows on desktop

Code is here

function doit()

dim wins,shl,all_wins

set wins=createobject("scripting.dictionary")

set shl=createobject("shell.application")

set all_wins=wins.windows

for each win in all_wins

wins.add win.hwnd,win

Next

End function

set get_name=doit()

for each oie in get_name.items

set ltst=oie.getroproperty("Creation Time")

' msgbox ltst

set ltst_name=oie.getroproperty("name")

print ltst&" Recent Window opened on desktop&"& ltst_name

Next

msgbox ltst&" Recent Window opened on desktop&"& ltst_name

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we import into Excel "Details" ,"Result" ,"Time" parameters from within a Results Report which is generated after a Run error when a script is executed in QTP? Refer E.g below Status Functionality Description RunDate Fail Login User should be able to Login 12/3/2007 StartTime EndTime Details* 1:31:58 PM 1:32:29 PM (this one i want)

1530


What is clean sweep?

1382


What are private functions in QTP? How they can be called from the function library?

638


What is business process testing(bpt) in qtp?

697


WAT IS DATA BASE AND XML CHECK POINT ?HOW TO IMPLEMENT IT ... GIVE PROPER EXAMPLE FOR IT

1711






How to export quicktest professional results to an .xls file?

576


What phases are involved in testing an application in qtp?

562


Define Error Pane of UFT?

696


Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)

1383


How to upload excel files into Quality Center using QTP Script and how to delete excel files from Quality?

614


How to analyzing test results using quicktest professional?

578


How Can I find the least value in a bunch of variables using qtp.. E.g.:- A = 210, B = 212, C = 60, D = 111 I don’t want to write bunch of lines for this…. Is there a way to get the result in one line…..

1630


What is Associate Repository in QTP 9.2 ?

605


Hi, I am working on microsoft infopath forms..It is standalone form..(not dotnet or web.) . I am not able to indentify any objects in it.. I am currently using active accessibility in the macro for the same but its execution is too slow.. Kindly help in case you have better solution.

2411


Can you brief the hurdles you faced during Automation testing?

580