O'Reilly logo

Designing and Implementing Test Automation Frameworks with QTP by Ashish Bhargava

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. DOM- and XPath-based Framework in Web Applications

For web application automation, QTP allows us to use the Document Object Model (DOM) and execute JavaScript. QTP also finds the elements using XPath. In this chapter, we are going to learn about DOM, basic JavaScript, and XPath terminology. We'll also learn, with an example, how to use XPath to find the elements and use them in creating scripts. QTP allows executing the JavaScript code in scripts. JavaScript can use the HTML DOM for finding elements, changing HTML content, attributes, style, and removing the HTML elements.

Document Object Model

The Document Object Model (DOM) allows representation of an HTML document as a tree structure as well as allows dynamic access and updating of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required