Monday, June 21, 2010

Parse QTP Report XML

'Parse QTP report xml, when required to convert into other file types
'Source : SQA Forums Post
'http://www.sqaforums.com/showflat.php?Cat=&Board=UBB20&Number=626183

*************************************************************************

Function parseQtpXmlResultFileExample()
Const XMLDataFile = "C:\Documents and Settings\Desktop\TestQTP\Res1\Report\Results.xml"

Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = False
xmlDoc.Load(XMLDataFile)

'Get test name:

Set TcNode = xmlDoc.SelectSingleNode("/Report/Doc/DName/text()")
MsgBox "Test case name:" &TcNode.NodeValue

Set node = xmlDoc.SelectSingleNode("/Report/Doc/NodeArgs/Disp/text()")

'Get product name:
Set node = xmlDoc.SelectSingleNode("/Report/Doc")
MsgBox node.GetAttribute("productName")

'Get Summary - sTime
Set node = xmlDoc.SelectSingleNode("/Report/Doc/Summary")
MsgBox node.GetAttribute("sTime")


''Get Summary - passed
Set node = xmlDoc.SelectSingleNode("/Report/Doc/Summary")
strPass = node.GetAttribute("passed")

MsgBox "Pass verification: " & strPass

'Get Summary - passed
Set node = xmlDoc.SelectSingleNode("/Report/Doc/Summary")
strPass = node.GetAttribute("passed")

MsgBox "Pass verification: " & strPass

End Function

*************************************************************************

call parseQtpXmlResultFileExample()

42 comments:

Anonymous said...

this doesn't work out in qtp can u suggest a code that works fine thanks

Jonty... said...

Hope your issue has been resolved by now. The easiest way is to creat a vbs and call that as a function.

But why doesnt it work on QTP, what is the issue ?

Anonymous said...

xanax online long pass drug test xanax - xanax overdose and death

Anonymous said...

buy tramadol online tramadol 50mg side effects for dogs - tramadol hcl 50mg tab for dogs

Anonymous said...

cheap tramadol online buy tramadol online cod no prescription - tramadol for dogs drowsy

Anonymous said...

buy tramadol with mastercard order tramadol by phone - tramadol 100mg buy online

Anonymous said...

xanax online does xanax show up on an oral drug test - xanax 11

Anonymous said...

buy tramadol online tramadol hcl 50 mg ingredients - can buy tramadol online usa

Anonymous said...

generic xanax xanax bars wikipedia - xanax side effects slurred speech

Anonymous said...

xanax online xanax withdrawal symptoms headache - xanax 1 mg upjohn

Anonymous said...

generic xanax xanax help anxiety - what is xanax 2mg for

Anonymous said...

buy carisoprodol carisoprodol 350 mg cost - carisoprodol gabapentin interaction

Anonymous said...

xanax online 2mg xanax get high - xanax withdrawal schedule

Anonymous said...

can you buy tramadol online legally buy tramadol in usa no prescription - tramadol 50 mg kapseln

Anonymous said...

buy tramadol online order tramadol online 100mg - buy tramadol online from usa

Anonymous said...

xanax online xanax drug assistance program - xanax and alcohol memory loss

Anonymous said...

buy tramadol online tramadol risks - tramadol addiction + 2011

Anonymous said...

buy cialis usa cialis reviews men - buy cialis line

Anonymous said...

http://buytramadolonlinecool.com/#30807 tramadol hcl 50 mg compared to hydrocodone - tramadol hcl obat apa

Anonymous said...

generic tramadol safe order tramadol online - tramadol hydrochloride 100 mg side effects

Anonymous said...

learn how to buy tramdadol tramadol extended release high - tramadol veterinary

Anonymous said...

http://landvoicelearning.com/#23561 tramadol addiction after 1 week - how to buy tramadol online overnight

Anonymous said...

buy tramadol tramadol cod online pharmacy - tramadol 50mg tablets

Anonymous said...

buy tramadol tramadol overdose narcan - buy tramadol online cheap

Anonymous said...

http://blog.dawn.com/dblog/buy/#about-us tramadol zofran interaction - buy tramadol online 100mg

Anonymous said...

learn how to buy tramdadol best online pharmacy tramadol - buy discount tramadol

Anonymous said...

buy tramadol without prescriptions tramadol 319 dosage - dealing with tramadol addiction

Anonymous said...

http://buytramadolonlinecool.com/#96430 tramadol withdrawal loperamide - buy tramadol online from usa

Anonymous said...

very best best free website to start an excellent blogg?


Feel free to visit my site :: paginasamarillas-atl.com

Anonymous said...

com is the most reliable, and professional Online Pharmacy
for Generic Drugs, with no prescription medication store.
Several methods recommended increasing penis size and surprise, surprise, none of them work.
Penis pumps are popular with men who have this condition.



my homepage - buy cheap viagra india

Anonymous said...

Hi are using Wordpress for your site platform?

I'm new to the blog world but I'm trying to get started and create my own.
Do you need any coding knowledge to make your own blog? Any
help would be really appreciated!

Visit my blog :: cheap dental implants

Anonymous said...

Hi, i believe that i noticed you visited
my weblog so i got here to go back the favor?

.I am trying to find issues to improve my web site!I guess its
good enough to use a few of your ideas!!

Feel free to visit my weblog ... Http://Ubb.Austincomputertn.Com/

Anonymous said...

Thank you a bunch for sharing this with all of us you really realize what you're talking about! Bookmarked. Please also consult with my web site =). We could have a hyperlink alternate agreement among us

Here is my web blog: dental implant costs

Anonymous said...

Today, I went to the beachfront with my kids. I found a sea shell and gave it to my
4 year old daughter and said "You can hear the ocean if you put this to your ear." She placed the shell to her
ear and screamed. There was a hermit crab inside
and it pinched her ear. She never wants to go back!
LoL I know this is totally off topic but I had to tell someone!



My web site; costs of dental implants

Anonymous said...

Pretty! This has been an extremely wonderful article.
Thank you for providing these details.

Stop by my homepage :: the tao of badass

Anonymous said...

Asking questions are genuinely good thing if you are not understanding something fully, except this paragraph offers pleasant understanding yet.


Feel free to surf to my weblog: tao of badass buy

Anonymous said...

Υour currеnt write-up hаs established neceѕѕary
to us. It’s quіte educаtional and yοu're simply certainly very experienced of this type. You possess opened my own eyes to be able to numerous opinion of this specific subject together with intriquing, notable and strong written content.

Also visit my site; buy viagra

Anonymous said...

buy tramadol for dogs buy tramadol medication - generic tramadol

Anonymous said...

I couldn't resist commenting. Exceptionally well written!

Visit my web page ... website

Anonymous said...

can you buy ambien order ambien online from canada - buy ambien sleeping pills

Anonymous said...

http://www.pregnancyaid.in
A blocked fallopian tube could be the of pelvic inflammatory disease or previous endometriosis. When these ladies are about to give birth, these leaves are also important because they help in the delivery process. Do not skip this process and immediately work your way south!

Anonymous said...

[url=http://www.vip1michaelkorsoutlet.org]Michael Kors Outlet[/url] Next time, reinvest only the amount you began with or less

[url=http://www.mislouboutinsaleuk.co.uk]Christian Louboutin Outlet[/url]Your lifestyle could well be improved with comfortable shoes

[url=http://www.getfreerunaustralia.org]Nike Free Run[/url]For example, how to dress up could be beautiful and charming? How to wear to be appropriate and tasted? They talk about kinds of fashion styles with friends

[url=http://www.upnikepascherfr.info]Nike Dunk[/url] But we're not getting leadership; we're just getting condolences