Use If loop + QTP Reporter object. On Sunday, 14 April 2013 04:34:42 UTC+5:30, Zak Shah wrote: > > I am comparing Msrp prices on two different pages.So my requirement is as > below > > if Msrp match on page a and b item report pass > if Msrp don't match on page a and b item report Fail > > > On Saturday, April 13, 2013 6:09:16 PM UTC-4, Ganesh muralidharan wrote: >> >> Your requirement is unlcear to me. Please be more specific. >> >> >> On Sat, Apr 13, 2013 at 3:58 PM, Zak Shah <[email protected]> wrote: >> >>> Dim bro, url, image >>> >>> bro = "iexplore" >>> url = "http://www.chevrolet.com/tools/help-choose-vehicles.html" >>> systemutil.Run bro, url >>> browser("title:=.*").Sync >>> wait 2 >>> DataTable.GetRowCount >>> i=1 >>> >>> Set mypage=browser("title:=.*").page("title:=.*") >>> >>> >>> While mypage.image("class:=mm size_3","index:="&i).exist >>> mypage.Sync >>> wait 3 >>> Datatable( "L1", dtGlobalSheet )= mypage.image("class:=mm >>> size_3","index:="&i).getroproperty("filename") >>> Datatable( "L1", dtGlobalSheet )= mypage.image("class:=mm >>> size_3","index:="&i).getroproperty("href") >>> >>> Set desc=description.Create >>> desc("micclass").value="WebElement" >>> desc("class").value="tx_price" >>> Set obj=browser("title:=.*").page("title:=.*").ChildObjects(desc) >>> Datatable( "l2", dtGlobalSheet )= obj(0).getroproperty("innertext") >>> mypage.image("class:=mm size_3","index:="&i).click >>> mypage.Sync >>> wait 4 >>> >>> i=i+1 >>> >>> Set desc2=description.Create >>> desc2("micclass").value="WebElement" >>> desc2("class").value="pf6a" >>> Set obj2=browser("title:=.*").page("title:=.*").ChildObjects(desc2) >>> Datatable( "l3", dtGlobalSheet )=obj2(0).getroproperty("outertext") >>> Datatable.SetCurrentRow(i) >>> Datatable.Export("C:\Users\wajahat.awan\Desktop\QTP\new >>> code\Default.xls") >>> >>> wait 6 >>> browser("title:=.*").Back >>> >>> ' Reporter.ReportEvent micFail, "Test fail", "MSRP price" >>> >>> Wend >>> >>> >>> >>> -- >>> -- >>> You received this message because you are subscribed to the Google >>> "QTP - HP Quick Test Professional - Automated Software Testing" >>> group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> For more options, visit this group at >>> http://groups.google.com/group/MercuryQTP?hl=en >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "QTP - HP Quick Test Professional - Automated Software Testing" >>> group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> >> >> -- >> Regards, >> >> >> Ganesh Muralidharan >> 'God Never Forgets' >> >
-- -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en --- You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
