Uft - QTP - HTML Dom - Automation Tutorial
Uft - QTP - HTML Dom - Automation Tutorial
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