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. |
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....
|
|||||||
|
|||
|
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. |
| Sponsored Links |
|
|||
|
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 |
| The Following User Says Thank You to deepasree For This Useful Post: | ||
|
|||
|
Quote:
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). |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
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 |