Prathamesh Deshmukh
Prathamesh Deshmukh

Reputation: 78

Taking screenshot of dropdown list in QTP

I have code for taking screenshot of web apps in QTP. At one instance i want to take screenshot of the dropdown list with the list showing but not able to manage that.

Upvotes: 0

Views: 880

Answers (1)

Amit
Amit

Reputation: 20456

Here's a way to do it, hope this helps...

SystemUtil.Run "Iexplore.exe","http://www.computerhope.com/jargon/d/dropdm.htm"
strPath="C:\dropdown_screenshot.bmp"

Setting.WebPackage("ReplayType")=2
Browser("Browser").Page("What is dropdown menu?").WebList("s").Click
Browser("Browser").Page("What is dropdown menu?").CaptureBitmap(strPath)
Browser("Browser").Page("What is dropdown menu?").WebList("s").Select "Choice 2"
Setting.WebPackage("ReplayType")=1

Dropdown list screenshot was captured successfully.

enter image description here

Upvotes: 5

Related Questions