I am trying to download a report using UFT by navigating to multiple web pages then finally interacting with download dialog box to save file on a particular location. But I want all this happen in background so want to make web pages and dialog box invisible while running the UFT. Is there any Browser and Dialog property which can make make them invisible in terms of GUI but download the report.
This is the code which I am using. Please help thanks in advance.
Browser("WELCOME. MicroStrategy").Page("WELCOME. MicroStrategy").Link("Link").Click
Browser("WELCOME. MicroStrategy").Page("WELCOME. MicroStrategy").Link("Shared ReportsRun reports").Click
Browser("WELCOME. MicroStrategy").Page("WELCOME. MicroStrategy").Link("Link_2").Click
Browser("WELCOME. MicroStrategy").Page("WELCOME. MicroStrategy").Link("Link_3").Click
Browser("WELCOME. MicroStrategy").Page("WELCOME. MicroStrategy").WebElement("tbExport").Click
While Dialog("Internet Explorer").Exist=False
wait(1)
Wend
If Dialog("Internet Explorer").Exist=True Then
Dialog("Internet Explorer").WinButton("Save &as").Click
End If
strSafeDate = DatePart("yyyy",Date) & Right("0" & DatePart("m",Date), 2) & Right("0" & DatePart("d",Date), 2)
strSafeTime = Right("0" & Hour(Now), 2) & Right("0" & Minute(Now), 2) & Right("0" & Second(Now), 2)
'Set strDateTime equal to a string representation of the current date and time, for use as part of a valid Windows filename
strDateTime ="H:\MSTR reports\IPP_Not_Paid_"& "_" & strSafeDate & "-" & strSafeTime
Dialog("Save As").WinEdit("File name:").Type strDateTime
Dialog("Save As_2").WinButton("&Save").Click
wait(5)
Browser("WELCOME. MicroStrategy").CloseAllTabs