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
In what occasion we can specify global sheet and action sheet?
Can any body please tell me the steps of keyword driven frame work in qtp. My mail is saswat445@gmail.com please send some materials on keyword driven testing in qtp. thanks a lot...
requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich" you must get the text in combo box and need to compare them how
What is the script for database check point, bitmapchek point, regular expression ?
What is an object repository?
what are all the fileds present in object repository?
What is Curd testing?
How many lines of code in each script of QTP?
What is Unicode Compatibility?
write a script to verify links on any web page by using descriptive method by creating a description object (give a filter condition only link) ... need to verify expected like name by reading
What is keyword view?
how do u plan test automation?
How do you create regression test packs?
What are some test assets and related extensions of qtp?
What is the new version of qtp which is recently released in the market?