Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reporter.reportevent result not displayed for second checkpoint
#1
Not Solved
Hi All,

I am facing one issue in which Reporter.reportevent..... test result not displayed for second checkpoint.

In mercury web site I am validating the Default date and month with current month and date.
I used following If Else statement...

Code:
If c=f Then
Reporter.ReportEvent 0,"Curent Month verified","Valid Month...Test Passed"
End If
If d=h Then
Reporter.ReportEvent 0,"Curent date verified","Validdate...Test Passed"
End If

My both conditions satisfied, but only first Test result displayed.
Second result "Curent date verified","Validdate...Test Passed" not displayed in Test Result even though d=h satisfied.

Any one pls help me why it is not displaying ?
Reply
#2
Not Solved
Hi Sudhirzpatil,

Add Else condition and check if you get a fail result.
Reply
#3
Not Solved
Code:
a= captured value from script
b= captured value from script
m=MonthName(month(date))
n=Day(date)
If a=m Then
msgbox "Current month match"
else
msgbox "Current month not match"
End If
If b=n Then
msgbox "Current Date match"
else
msgbox "Current Date not a match"
End If

Here a=m and b=n both condition satisfy, still it display "Current Date not a match" for second condition.
Reply
#4
Not Solved
Hi Sudhir,

Please mention the values in a, b, m and n.
Try using CDate(a) and CDate(b) at the time of verification.
Reply
#5
Not Solved
Hi Manish,
Captured value for a= December ( Vurrent month)
Captured value for b= 6 (i.e Todays Date)

My result shows "Current month match" which is true.
but even if b=n satisfied, it displayed "Current Date not a match"
Is there anything wrong with If..else statment ?
Reply
#6
Not Solved
Try,

CInt(b) & CInt(n)

This will convert the value in b and n to int and then check if both values are same.
This should work.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  verify that parent properties match object currently displayed in your application. sona 0 3,137 02-21-2016, 12:00 PM
Last Post: sona
  Auto Complete list not displayed in PEGA7 adityacharan 0 2,418 11-29-2015, 12:07 PM
Last Post: adityacharan
  Reporter unable to load results when objects are involved? Elimelech.Eli 2 3,810 06-01-2014, 01:37 PM
Last Post: Elimelech.Eli
  How to get qtp Reporter/Summary in vb script rlin2012 1 3,524 11-20-2012, 02:55 PM
Last Post: harishshenoy
  Menu is not displayed on the website to run QTP 11 jacosta 1 2,516 10-02-2012, 08:47 PM
Last Post: freeboynil

Forum Jump:


Users browsing this thread: 1 Guest(s)