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
what is the advantages and disadvantages of using functions instead of re usable actions
"What are the common constrains that we need to consider when we prepare testcases for ASP application". Thanks in Advance...
How is a Step generator used in UFT?
Describe function procedure in vbscript.
What are the types of object repositories? Which one is you are using?
Is there any relation between Keyword Driven Framework and Recording modes provided in QTP( whether Recording modes are applied on keyword driven framework or not?)
What processes will be required to manage updates to the web site's content, and what are the requirements for maintaining, tracking, and controlling page content, graphics, links, etc.?
How will you test a keyboard?
In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?
The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)
What is TOM in QTP?
after initiating one project for testing, when exacltly QTP tester role starts?
when to start the automation?
How you are developing the script? Using record and play back or manual?
whenever U using QTP,Test Director, Why we using separate Bug tracking tool?