Answer Posted / raju
to get an HTML source code of Web page
HtmlCode = Browser("Google Labs").Page("Google Labs").Object.documentElement.outerHtml
' save HTML code to a local file
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateTextFile("C:\HtmlCode.html", True, -1)
f.Write(HtmlCode)
f.Close()
' run tidy.exe to convert HTML to XHTML
Set oShell = CreateObject("Wscript.shell")
oShell.Run "C:\tidy.exe --doctype omit -asxhtml -m -n C:\HtmlCode.html", 1, True ' waits for tidy.exe to be finished
' create MSXML parser
Set objXML = CreateObject("MSXML2.DOMDocument.3.0")
objXML.Async = False
objXML.Load("C:\HtmlCode.html")
XPath = "//a" ' XPath query means to find all links
Set Links = objXML.SelectNodes(XPath)
Msgbox "Total links: " & Links.Length
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Client is able to provide budget..he want you to choose the automation tool for the web application? which one you will select ? QTP or Selenium ? what are the reasons?
how can i pass a "cript"as a parameter in to a function
What is the meaning Work bench?
How to add synchronisation points in qtp?
There is an excel file of 1 to 100 sheets how you will iterate through it?
What is meant by Output Value in UFT?
in qtp if we record a object and we record the object using virtual wizard then by which way the object is recognized that means recorded
www.icici.com after this home page wll came, in this page what r the items we r going to test for manual and what the element we r test for QTP... explian clearly with example
I recorded a Web App with a Oracle backend using QTP 9.5 and for some reason the scripts don't play back> What am I missing at this point. I recorded the same Apps under Sybase and they work great. This is Oracle 10g. Why won't my scripts play back.
How to define array in qtp?
Brief the process of testing with UFT?
What is synchronization? What are the ways you can synchronize?
how to idetfy which test cases are automated?who will deside that plz tell me
What are the key points to create a framework in QTP for oracle forms?
What is difference between shared and local object repository?