software testing genius

Tutorial-4 Recording of Tests in QTP with Drag and Drop Web Elements

Welcome to “Software Testing Genius”. Subscribe to my RSS feed for latest content on Software Testing.

Tutorial-4 Recording of Tests in QTP with Drag and Drop Web Elements

This short tutorial guides you to the process of Recording and Running of tests in QTP involving web application has drag and drop of elements

QTP does not record web drag and drop events such as ondragstart and ondrop by default. QTP needs to be configured to capture these events.

In QTP goto the Tools->Web Event Recording Configuration and click the Custom Settings button.

Save the settings to an XML file.

Open the XML file in notepad and enter the following two XML lines of code under

"Object Name="Any Web Object""

"Event Name="ondragstart" Listen="1" Record="2""
"Event Name="ondrop" Listen="1" Record="2""

In the custom settings screen, select Load Configuration from the screen anbd load the modified XML file. If you click on "Any Web Object", now it should show on the list that it is capturing the events ondragstart and ondrop.

When recording a test you will now see that QTP is capturing the drag and drop events. The code will show that webElement("").FireEvent "onDrop"

If the drag and drop code uses Javascript to pass data through the clipboard for the drag and drop operation, code needs to be changed. Since the event is executed from externally, Javascript is not able to get a handle to the clipboard. The code might look like this:


oData = window.event.dataTransfer;

This code needs to be changed to:
var oData = window.clipboardData;

Many More Tutorials on HP QTP 11.0

Study Material - HP QTP & QC Certification Exam

Study Material - HP LoadRunner Certification Exam

Study Material - IBM RFT Certification Exam

What Successful Testers say about the Quality of this website

If you want to keep track of further articles on Software Testing,
I suggest you to subscribe my
RSS feed


You can also Subscribe by E-mail
and get All New articles delivered directly to your Inbox.

Full Study Material for Popular Certification Exams:

Largest Database of Sample Papers - 1000+ Unique Questions for ISTQB Foundation Exam

ISTQB Foundation Exam - Full Crash Course for Download

ISTQB Advanced CTAL Test Analysts Exam - Full Crash Course for Download

ISTQB Advanced CTAL Test Manager Exam - Full Crash Course for Download

Study Material - ISTQB Certification Exam

Consolidated Study Material - Testing & QA

Most Popular Topics in Demand:

Practical Roadmap to QTP Certification

Practical Roadmap to CSTE Certification

General HR Interview Questions Common For All 

Tricky HR Interview Questions Common For All

Rehearsal of QTP in 1 Hr. -  Interview Questions


Comments :


Leave Your Comments: (*) Marked Fields are Mandatory

You can apply basic formatting to the text

Name *
Email Address *
Speak your mind
sex hikayeleri