In QTP, when we execute the test cases, test cases may fail due to valid / invalid defects. They may also fail due to script issues or any other issues like network failure.
After the test execution ends, We only have the html reports or QTP results with us which does not give clear picture about the status of application. To solve this problem we can take the snapshot of the application when any test step fails.
Example - Below code will take the screen shot. You can insert this code anywhere you want to take the screen shot.
Window("xyz").CaptureBitmap "c:\screenshots\abc.png",True
'In above code we are storing the png image file to c drive location. Second parameter tells whether to overwrite existing file.
Thus you can use capturebitmap method of any object to take the screen shot.
Please give your inputs, suggestions, feedback to Us about above QTP topic. We value your thoughts.
After the test execution ends, We only have the html reports or QTP results with us which does not give clear picture about the status of application. To solve this problem we can take the snapshot of the application when any test step fails.
Example - Below code will take the screen shot. You can insert this code anywhere you want to take the screen shot.
Window("xyz").CaptureBitmap "c:\screenshots\abc.png",True
'In above code we are storing the png image file to c drive location. Second parameter tells whether to overwrite existing file.
Thus you can use capturebitmap method of any object to take the screen shot.
Please give your inputs, suggestions, feedback to Us about above QTP topic. We value your thoughts.
No comments:
Post a Comment
Please Leave your reply. We value your feedback and inputs