raju


{ City } pune
< Country > india
* Profession *
User No # 6104
Total Questions Posted # 0
Total Answers Posted # 7

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 26
Users Marked my Answers as Wrong # 9
Questions / { raju }
Questions Answers Category Views Company eMail




Answers / { raju }

Question { 8188 }

How we can add objects to the object repository during the
running?is it possible or not?explain


Answer

I think it's possible, using the setToproperty.u can add
the one 0r more property's in runtime

SCRIPT:
OH.setTOpropery "property name","propery value"

If u have any doubt just give me the call:
09823257761
pune-14

Is This Answer Correct ?    2 Yes 0 No

Question { 9940 }

how to use import and export sheet methods in qtp


Answer

when ever we want to use the data from excel on the time we
can import the data from excel to QTP
Ex:
datatable.importsheet "path",sourcesheet, destination sheet.

after completion of work we send to the result to the
higher person on time we can use Export method

ex:
datatable.exportsheet "path",localsheet no.


raju.ippali@gmail.com
9823257761

Is This Answer Correct ?    5 Yes 1 No


Question { AppLabs, 15831 }

how to read log file using QTP??


Answer

Log files is nothing but *.txt & *.xls files

How to read log file *.txt:
1). for ex file name is raju.txt.

set a=createobject("scripting.filesystemobject")
set b=a.opentextfile("File path",1) (1 for Reading,2 for
Writing,8 for Appending)
while b.atendofline <>true
c=b.readline
msgbox c
wend

2). for ex file name is raju.xls
datatable.importsheet "file path", Sourcesheet, destination
sheet.
msgbox datatable(column no, sheet name)


i think this is working properly
if u have any quarries please call me
9823257761, my mail id is raju.ippali@gmail.com

Is This Answer Correct ?    4 Yes 2 No

Question { 6393 }

Hi All
Below is my script which i made for lgin into Flight.exe.

SystemUtil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe","","C:\Program
Files\Mercury Interactive\QuickTest
Professional\samples\flight\app\","open"

Dialog("Login").WinEdit("Agent Name:").Set DataTable
("p_Text", dtGlobalSheet)

Dialog("Login").WinEdit("Agent Name:").Type micTab

Dialog("Login").WinEdit("Password:").SetSecure DataTable
("p_Text1", dtGlobalSheet)

Dialog("Login").WinButton("OK").Click

If Dialog("Login").Dialog("Flight Reservations").WinButton
("OK").exist Then

Dialog("Login").Dialog("Flight Reservations").WinButton
("OK").Click

datatable.Value(3)= "Incorrect password. Please
try again"

Dialog("Login").WinButton("CANCEL").Click

elseif Dialog("Login").Dialog("Flight
Reservations").WinButton("OK").exist Then

Dialog("Login").Dialog("Flight
Reservations").WinButton("OK").Click

datatable.Value(3)="Please enter agent
name"

Dialog
("Login").WinButton("CANCEL").Click

elseif Dialog("Login").Dialog("Flight
Reservations").WinButton("OK").exist then

Dialog("Login").Dialog("Flight
Reservations").WinButton("OK").Click

datatable.Value(3)= "Please
enter password"

Dialog("Login").WinButton
("CANCEL").Click

else Window("Flight Reservation").Move 309,146


datatable.ExportSheet "C:\Raj\Result.xls" ,1

Window("Flight
Reservation").Close

End If


I want to capture the Message string from
Dialog("Login").Dialog("Flight Reservations"

Also pls let me know if this is the right way to do the
script for login. Pls provide some script for login
Flight.exe

Thanks in advance

Raj Dhiman


Answer

R u thinking is Good.

U will follow few steps:

1). u will store all the object information in object
repository.
2). u will give wrong password and click on "OK" Button
3). after that u got one dialog window that window also
stored into the object repository.
4). u will give valid username, password and click on "OK"
button.
5). u got window flight reservation window. This window
also stored into the object repository. After that u
Generate the script.

if not dialog("Login").exist(2) then
invokeapplication "Path of Flight Reservation"
End if

dialog("Login").winedit("Agent Name").set datatable(1,1)
dialog("Login").winedit("Password").set datatable(2,1)
dialog("Login").winbutton("OK").click

if dialog("Login").dialog("Flight Reservation").exist(2)
then
dialog("Login").dialog("Flight REservation").winbutton
("OK"). click
dialog("Login").winbutton("Cancel").click
datatable(3,1)="Fail"
else
window("Flight Reservation").close
datatable(3,1)="Pass"
end IF

datatable.exportsheet "Path",1

i think this is working properly
if u have any quarries please mail me raju.ippali@gmail.com
my no is 9823257761

Is This Answer Correct ?    0 Yes 0 No

Question { NIIT, 24640 }

Whenever we use GETROPROPERTY function.


Answer

when ever u want to capture the object value on that time
we can use GetROproperty.

RO Property means: Run time Objective propertys
means what are the objective properties that all are know
as RO properties.

for ex we can capture the value in result

window("calc").vbedit("A").set "10"
window("Calc").vbedit("B").set "20"
window("Calc").vbbutton("Add").click
c=window("Calc").vbedit("result").getROproperty("text")

i think this is working properly
if u have any quarries please call me 9823257761
raju.ippali@gmail.com

Is This Answer Correct ?    14 Yes 3 No

Question { BSL, 17627 }

write a qtp script to see time in windows command prompt?
its urgent....


Answer

set a=createobject("wscript.shell")
a.run "command"
a.sendkeys "time"
wait(5)
a.sendkeys "~"
a.sendkeys "Exit"

i this script working. if at all any quarries please send
me mail
raju.ippali@gmail.com
9823257761

Is This Answer Correct ?    1 Yes 2 No

Question { BSL, 4821 }

how can we group that these test cases only should be
automated and in which order you execute that test cases?


Answer

for ex 500 test cases are there.
we want to conduct retesting only 100 cases.
on the time we can introduce QTP.

1). After that each and every test cases created seperate
actions.
2). each and every action make re-usable action.
3). when ever u need the action on the time call the action.

Is This Answer Correct ?    0 Yes 1 No