-
Contributing Member
msg boxes in test result window
Hai.
I am using QTP 9.0 for web testing.
i am new for this plz help me.
1. In my scripts i add the message boxs for conformation the results. because in my web i have to see that message boxes. If i display message boxes, i have to go the script and click ok in the msg box then only script move the next line. but i want to write these msg boxes in the test result window itself. so i cant save the time and i will not sit in front off the monitor na. once my script finished its run i can easily analysis the result with my messages na.
Is there any option for this facility. plz help me for this
-
Contributing Member
Re: msg boxes in test result window
Reporter.reportevent eventstatus, reportstepname, details [, in] argument type description eventstatus number or pre-defined constant status of the report step: 0 or micpass: causes the status of this step to be passed and sends the specified message to the report. 1 or micfail: causes the status of this step to be failed and sends the specified message to the report. When this step runs, the test or component fails. 2 or micdone: sends a message to the report without affecting the pass/fail status of the test or component. 3 or micwarning: sends a warning message to the report, but does not cause the test or component to stop running, and does not affect the pass/fail status of the test or component. Reportstepname string name of the intended step in the report (object name). Details string description of the report event. The string will be displayed in the step details frame in the report. In n/a not in use. Example the following examples use the reportevent method to report a failed step. Reporter.reportevent 1, "custom step", "the user-defined step failed." or reporter.reportevent micfail, "custom step", "the user-defined step failed."
-
Contributing Member
Re: msg boxes in test result window
Hi,
I cant understand ur ans.
Plz explain.
-
Contributing Member
Re: msg boxes in test result window
U can use Reporter.reportevent to pass messages to the Test results. I had just pasted the syntax of Reporter.reportevent
-
Contributing Member
Re: msg boxes in test result window
Hi,
I count the checked boxes.
in my page display only 25 orders
i checked all 25
now i test the total no of records and checked boxes
it should 25=25
this result is pass
else fails
now i got 2 counts
and compare that and display the msg "Pass"
How i write this in the test result.
how i use this reporter.reportevent
Plz explain
i am new for QTP.
-
Junior Member
Re: msg boxes in test result window
HI..
try this code...
set chkbox = description.create
chkbox("class name").value = WinCheckbox
get_chkbox = window("").childobjects(chkbox)
count_chkbox = get_chkbox.count
x = 0
for i = 0 to count_chkbox-1
get_property = get_chkbox(i).getROProperty("checked")
if get_property = "ON" then
x = x+1
else
end if
Next
if x = count_chkbox then
reporter.reportevent micpass, "all are checked","all checkboxes in window are checked"
else
reporter.reportevent micfail, "some are not checked" "some checkboxes in window are not checked"
end if
it will work..and it does not show mesagebox and directly writes to results window.
-
Contributing Member
Re: msg boxes in test result window
Hi sudhananda
Thanks reddy, Its working fine.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules