Professional Documents
Culture Documents
Search for:
Search
Online Tutorial
http://www.automationtutorial.com/qtpuft/uftqtp-html-dom/ 1/8
5/8/2018 UFT/QTP – HTML DOM | AUTOMATION TUTORIAL
Tags
http://www.automationtutorial.com/qtpuft/uftqtp-html-dom/ 2/8
5/8/2018 UFT/QTP – HTML DOM | AUTOMATION TUTORIAL
AOM (http://www.automationtutorial.com/tag/aom/)
QTP Tutorial
(http://www.automationtutorial.com/tag/qtp-tutorial/)
Quick Test Window (http://www.automationtutorial.com/tag/quick-test-window/)
http://www.automationtutorial.com/qtpuft/uftqtp-html-dom/ 3/8
5/8/2018 UFT/QTP – HTML DOM | AUTOMATION TUTORIAL
Selenium Tutorial
(http://www.automationtutorial.com/tag/selenium-
tutorial/)
selenium WebDriver (http://www.automationtutorial.com/tag/selenium-webdriver/)
Syncronization (http://www.automationtutorial.com/tag/syncronization/) UFT Actions (http://www.automationtutorial.com/tag/uft-actions/)
UFT Tutorial
(http://www.automationtutorial.com/tag/uft-tutorial/)
VBScript (http://www.automationtutorial.com/tag/vbscript/)
Event Handlers
Parent Nodes
Ready State
Source Index
http://www.automationtutorial.com/qtpuft/uftqtp-html-dom/ 4/8
5/8/2018 UFT/QTP – HTML DOM | AUTOMATION TUTORIAL
A UFT for every web object there is a property called “object”. Using this property the internal methods and
properties can be accessed for any web object.
Syntax: WebObjectClass(“PropertyName:=PropertyValue”).Object
Set IE = CreateObject(“internetexplorer.application”)
IE.Visible = True
IE.Navigate = “http://google.co.in”
Properties
activeElement Property – Retrieves the object that has the focus when the parent document has focus.
readyState Property – Retrieves a value that indicates the current state of the object.
URL Property – Sets or retrieves the URL for the current document.
http://www.automationtutorial.com/qtpuft/uftqtp-html-dom/ 5/8
5/8/2018 UFT/QTP – HTML DOM | AUTOMATION TUTORIAL
URLUnencoded Property – Retrieves the URL for the document, stripped of any character encoding.
Collections
frames – Retrieves a collection of all window objects de ned by the given document or de ned by the
document associated with the given window.
links – Retrieves a collection of all objects that specify the HREF property and all area objects in the
document.
Methods
getElementById Method – Returns a reference to the rst object with the speci ed value of the ID
attribute.
getElementsByName Method – Retrieves a collection of objects based on the value of the NAME
attribute.
<HTML>
<title>Sample Document</title>
<body>
<a href=”http://www.automationtutorial.com/”>Automationtutorial.com</a>
<a href=”http://www.hp.com/”>HP</a>
</body>
</HTML>
http://www.automationtutorial.com/qtpuft/uftqtp-html-dom/ 6/8
5/8/2018 UFT/QTP – HTML DOM | AUTOMATION TUTORIAL
msgbox domObj.length
msgbox domObj(objIndex).href
Next
Leave a Reply
Your email address will not be published. Required elds are marked *
Comment
Name *
http://www.automationtutorial.com/qtpuft/uftqtp-html-dom/ 7/8
5/8/2018 UFT/QTP – HTML DOM | AUTOMATION TUTORIAL
Email *
Website
Post Comment
Contact Me (http://www.automationtutorial.com/contact-me/)
http://www.automationtutorial.com/qtpuft/uftqtp-html-dom/ 8/8