Oh well, I got it... Need to think about it though.. Thanks anyways!
On Fri, Aug 28, 2009 at 6:18 PM, RRJoshi Joshi <rrjoshi0...@gmail.com>wrote: > Thanks Mike. > I have one more doubt though...please clarify it: > > If you open Google webpage, the visible links are only 16 (excluding "web" > but including Privacy and all other links in blue). > However, when I use QTP to count the no.of links, the result is 29. > Also, when I learn all the objects of Google page, using the Object > repository, it also learns some links like, > Blog,Finance,EvenMore,Calendar,YouTube, whereas these are not visible on the > page. > And if you ask QTP to identify these links on the Google Page, it tries to, > meaning some rectangular boxes are flashed (as though the links are there in > those boxes). > > How is this possible?Why is it like this? > This could mean that a tester's assumption that there are 16 links on > Google webpage could be wrong, the testcase itself is wrong. > > Could someone please clarify this for me? > > Thanks so much. > > -Joshi > > On Fri, Aug 28, 2009 at 5:43 PM, mike pietsch <mikepiet...@me.com>wrote: > >> >> Assuming NumLinks gets a values, there is only one = in an if >> statement. Not == >> >> >> ...from my iPhone... >> >> On Aug 28, 2009, at 5:25 PM, RRJoshi Joshi <rrjoshi0...@gmail.com> >> wrote: >> >> > Hi, >> > I am trying a simple scenario where in I want to count the number of >> > links on Google webpage. >> > If the no.of links equals 16 then I want the Result as Pass in QTP >> > Test Results, for this I am using ReportEvent. >> > However, there is some mistake in my code. >> > Could anyone please help resolve these? >> > >> > Browser("Google").Page("Page_Google").Sync >> > Set LnkCounter=Browser("Google").Page("Page_Google").Object.links >> > NumLinks=LnkCounter.length >> > If NumLinks==16 Then >> > Reporter.Report Event micPass, "No.of Links", "the user defined >> > step passed." >> > End If >> > >> > Thanks in advance! >> > >> > -RRJoshi >> > >> > > >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ 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 MercuryQTP@googlegroups.com To unsubscribe from this group, send email to mercuryqtp+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -~----------~----~----~----~------~----~------~--~---