Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Relationship between QTP and DOM

This is a discussion on Relationship between QTP and DOM within the QTP forums, part of the Software Testing category; Is DOM(Document Object Model) is used with QTP? What is the relationship between QTP and DOM? Will QTP Record uses DOM while recording or playing back. please explain....

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 07-09-2009
Junior Member
 
Join Date: May 2009
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
goksn is on a distinguished road
Relationship between QTP and DOM

Is DOM(Document Object Model) is used with QTP? What is the relationship between QTP and DOM?

Will QTP Record uses DOM while recording or playing back.

please explain.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-09-2009
Expert Member
 
Join Date: Apr 2008
Location: Tamilnadu
Posts: 1,909
Thanks: 16
Thanked 181 Times in 170 Posts
deepasree has a spectacular aura aboutdeepasree has a spectacular aura about
Re: Relationship between QTP and DOM

Hai friend

What is Document object Model?

A platform- and language-independent standard object model for representing HTML or XML and related formats.


When can we use DOM?
One of the very important places you can use it is when a QTP web table checkpoint doesn’t show you the desired content in a cell. I mean the content in the cell is in a format that is not supported by the web table checkpoint. Another use can be when you want to access all the HTML tags used in a webpage. You can get the names, the innertext, innerHTML property of all these tags. The possibilities are endless.
How can we use DOM to access the source page?

We can access the source page of any webpage using .object notation.

Any practical example of using DOM?

I have created a demo web page to show you document object model in action. Say you want to find the font color used for writing Happy Holidays Everyone in cells of the webtable given on this page. The algorithm would be:

1. Access the DOM of webtable using .object notation.
2. Access the tagname corresponding to the property you wish to find out. In our case tagname is “font” and property to be explored is “color”.

3. Find the count of total number of tags and loop it find out the font-color.

The corresponding VB script would be:

set font=Browser("B").Page("P").WebTable("H").Object.all.tags("font")

msgbox font.length

For i=0 to font.length-1
Msgbox font(i).color
next

Thanks
Deepa
Reply With Quote
The Following User Says Thank You to deepasree For This Useful Post:
  #3 (permalink)  
Old 08-01-2009
Junior Member
 
Join Date: Sep 2008
Location: NCR
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Vishal Aggarwal is on a distinguished road
Re: Relationship between QTP and DOM

Is there any other practical scenarios where we can use this concept in QTP?
Reply With Quote
  #4 (permalink)  
Old 08-04-2009
Expert Member
 
Join Date: Apr 2008
Location: Tamilnadu
Posts: 1,909
Thanks: 16
Thanked 181 Times in 170 Posts
deepasree has a spectacular aura aboutdeepasree has a spectacular aura about
Re: Relationship between QTP and DOM

Hai vishal Aggarwal,

Let me know what you are expecting based on that will suggest real time examples.

Thanks
Deepa
Reply With Quote
  #5 (permalink)  
Old 09-05-2009
Junior Member
 
Join Date: May 2009
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
goksn is on a distinguished road
Smile Re: Relationship between QTP and DOM

Quote:
Originally Posted by goksn View Post
Is DOM(Document Object Model) is used with QTP? What is the relationship between QTP and DOM?

Will QTP Record uses DOM while recording or playing back.

please explain.
Ans: QTP uses DOM on both record as well as playing back.

For example, while accessing Webtable cell element, you can see the use of DOM, the sample VB Script is something like

Mydata=Browser("Mybrowser").Webpage("mypage").WebTable("Table1").GetCellWithText("CellData1")

Here, QTP uses the .(dot) operator to access the web table cell data (DOM notation).
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Employement relationship chdev59 Career Advice 1 08-13-2008 01:32 AM
Relationship with stakeholders jayjay18 Testing Issues 0 04-05-2008 03:58 AM
Relationship in Database RyanJames Database General 1 01-12-2008 12:51 PM
How to configure many to many relationship? Geek_Guest Seibel 3 12-06-2007 02:38 AM
solve the relationship vmshenoy Brainteasers 7 01-16-2007 12:53 AM


All times are GMT -4. The time now is 12:16 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved