Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
comparing two values
#1
Exclamation 
i am trying to compare two values.one which is read from excel and the other captured from the screen(mainframe).the condition is that if those two values are equal we should enter the loop.but condition is not being satisfied where it actually should.the risk on excel is written by the qtp program.please suggest what is going wrong...
Reply
#2
Please post your code?
Reply
#3
Hi All,

I am comparing two values , If both values are equal test case should pass,

here is what I am doing


Code:
a=datatable("Checked_Text",dtGlobalSheet) b=datatable("B",dtGlobalSheet) If strcomp(a,b)=0 then PASS Testcase Else FAIL Testcase endif

I wonder what I need to do in PASS and FAIL?
Reply
#4
Hi ,

You can Put a reporter event with the testcase name and status like
Reporter.ReportEvent Micpass,"TCO1","Pass"

Or you can write it in the datatable itself and export it at the end of the execution
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Comparing two unsorted excel columns ProTester 2 3,483 09-13-2018, 02:11 PM
Last Post: ProTester
  comparing two excel sheets in QTP kodhanrajesh 0 4,733 08-31-2011, 09:01 AM
Last Post: kodhanrajesh
MyBB Comparing the mail content through QTP/DP gsjegan 1 4,572 06-17-2009, 03:12 PM
Last Post: chaitanyaponangi
  Comparing two bitmap files. lskmuni2000 5 6,052 07-17-2008, 06:11 PM
Last Post: lskmuni2000
  How to compare local sheet values with run time data table values? test71 2 9,120 03-14-2008, 07:09 PM
Last Post: test71

Forum Jump:


Users browsing this thread: 1 Guest(s)