Posts

Showing posts with the label function

Download and Save an Excel Sheet using QTP

During automation we might have came across scenarios which requires selecting group of data and downloading an Excel file and then save it on a particular location. Automating Excel sheets requires correct steps to follow. At first you have to create an Excel object and then to save, you have to choose a dynamic location and it should not be machine dependent. So here i am presenting a quick function that serves the discussed purpose. Step 1. Make a vbs file i.e open notepad copy the below code and save it with a .vbs extension. [Name].[vbs]. Step 2 . Add the function in QTP resources. Browse file > Settings > Resources tab. Step 3 Now Call the function in your code where required. Use keyword 'Call' ''''''Function initializing Public Function ExcelExport() ''''''Check excel button existence If (Browser("name:=.*").Page("title:=.*").WebButton("html id:=some ID").Exist(1)) the...