How To Capture Screenshots When An Error Occurs
Contents |
Things Small and Medium Business Service Providers All Solutions Services Advise, Transform and Manage Financing and Flexible Capacity IT Support Services Education and Training capture screenshot in qtp results Services All Services Products Integrated Systems Composable Systems Converged Systems
How To Take Screenshot Using Vbscript In Qtp
Hyper Converged Systems Blade Systems Infrastructure Management Software Application Lifecycle Management Application Delivery Management Big Data Analytics DevOps Enterprise Security Hybrid and Private Cloud Information Governance Information Management IT Service Management Operations Management Server Management Software as a Service (SaaS) Software-Defined Data Center Storage Management All Software Servers Rack Servers Tower Servers Blade Servers Density Optimized Mission Critical Servers Servers for Cloud Server Management All Servers Storage All-flash and Hybrid Storage Midrange and Enterprise Storage Entry Storage Systems Data Availability, Protection and Retention Software Defined Storage Management and Orchestration Storage Networking All Storage Networking Switches Routers Access Points and Controllers Wireless LAN Campus and Branch Networking Data Center Networking Wide Area Network Software Defined Networking Network Functions Virtualization Network Management All Networking About UsSupportClearType to search2086159Solutions Transform to a Hybrid Infrastructure Protect Your Digital Enterprise Empower the Data-Driven Organization Enable Workplace Productivity Cloud Security Big Data Mobility Infrastructure Internet of Things Small and Medium Business Service Providers All Solutions Services Advise, Transform and Manage Financing and Flexible Capacity IT Support Services Education and Training Services All Services Products Integrated Systems Composable Systems Converged Systems Hyper Converged Systems Blade Systems Infrastructure Management Software Application Lifecycle Management Application Delivery Management Big Data Analytics DevOps Enterprise Security Hybrid and Private Cloud Information Governance Information Management IT Service Management Operations Management Server Management Software as a Service (SaaS) Software-Defined Data Center Storage Management All Software Servers Rack Servers Tower Servers Blade Servers Density Optimized Mission Critical Serve
image of desktop when error occurs checkboxIn QTP 9.2, follow the below navigation:Tools -> Options -> Run tab -> In the drop down list box "On Error"(default) is selected for "Save step screen capture to results"And even we can also configure, whether we have to proceed to next step or stop the test execution by following below navigation:File Menu -> Settings -> Run Tab -> Choose the required action from the "Whenever an error occurs during run session" drop down list box. Posted by Anem Udaya Kumar at 12:14 PM 1 comment: shobhit said... and where does this error get saved?? from where to retrieve this image or screenshot? could you clarify? August https://community.hpe.com/t5/Unified-Functional-Testing/Get-the-screen-shot-when-error-occurs-in-qtp/td-p/4380163 26, 2009 at 1:45 PM Post a Comment Newer Post Older Post Home Subscribe to: Post Comments (Atom) Total Pageviews About Me Anem Udaya Kumar I am simply cute. My Hobbies are Net Surfing, Learning new technologies, chit chat with friends. My blogs are: http://qtpftvideos.blogspot.in/ http://hpsqtp.blogspot.com/ http://udayfun.blogspot.com/ http://udayvideos.blogspot.com/ View my complete profile Blog Archive ► 2013 (10) ► March (2) ► February (3) ► January (5) ► 2012 (14) ► December (1) ► November (2) ► July http://hpsqtp.blogspot.com/2008/08/how-to-capture-screen-shots-when-error.html (1) ► June (2) ► April (2) ► March (4) ► February (2) ► 2011 (28) ► September (1) ► July (13) ► June (9) ► May (3) ► February (1) ► January (1) ► 2010 (15) ► June (1) ► May (10) ► April (4) ► 2009 (7) ► November (1) ► May (3) ► April (3) ▼ 2008 (125) ► November (1) ► October (2) ► September (5) ▼ August (25) How to find out the number of links in a web page what is the difference between Automation object m... What is the vb script when the url enter into the ... How to capture screen shots when an error occurs? Where the text version of script file located in f... How to call action into a script How to get line numbers in your editor in expert v... How to Parameterize Object repository in QTP? What are the product enhancements in QTP 9.2 What are the new features in QTP 9.2 Can the class of an object be retrieved using the ... Why QTP iterates for rows removed from the Data Ta... When are optional steps used? What are environmental variables in QTP? How to us... Deleted a reusable external action from test, but ... What property we use to get the tooltip of a link ... How to programmatically load a Shared Object Repos... How c
LinkedIn 0 Email -- 1 Flares × A common feature that QTP testers are often asked to implement is to capture the application screenshot http://www.automationrepository.com/2011/11/how-to-capture-application-screenshot-using-qtp/ every time an error occurs during test run. This is definitely a good to have feature in your automation framework because - a) When a script fails, you would have a proof that it failed due to an application issue and not due to your script, and b) with the error screenshot, the developers usually find it easier to identify/fix the issue. how to How to capture application screenshot QTP provides a method called CaptureBitmap that can capture the image of either an object within the application or the entire screen/desktop and save it in any desired location. The image is saved as .png or .bmp file depending upon the file extension provided during the function call. The object is captured as it appears in the how to capture application when the method is performed. If only a part of the object is visible, then only the visible part is captured. Let's see some examples on how this functionality can be used - Example 1: Capture the image of a WebTable object and save it in the test's run result folder (relative path). Function fnCaptureBitmap1
Browser("brBrowser").Page("pgPage").WebTable("tblResults").CaptureBitmap "webtable.bmp"
End Function In the above function since the file name path is relative, the screenshot is saved in the test result folder. To save the image in some specific folder, the user needs to provide the complete/absolute path of the folder. Example 2: Capture the Browser image and save it in a specified folder (absolute path). Function fnCaptureBitmap2
Browser("brBrowser").CaptureBitmap "D:/CaptureScreenShotDemo/generic_image.png"
End Function With this method the image gets stored in a specific location. Let's suppose that there is already an image with the same name in the folder. With the above code, QTP will not overwrite the already existing image. To ove