Could someone help me with logic, i am new to automation UFT.
My aim is to save PDF by changing the name and in specific folder.
- click on preview button in main window to preview PDF
- new browser will open with PDF, but there is no address bar with URL for new browser or menu bar to save PDF.
- close only new browser so that i can go back to main browser for diff PDF
I used below logic to save PDF, but it works for only one time, as PDF already saved on desktop. I got around 200 PDF in browser.
Browser("Login").Page("Select Letter").WebButton("Enter").Click
Browser("Login").Page("Select Letter").WebButton("Next").Click
Browser("Login").Page("Select Letter").WebButton("Preview").Click
Browser("Login").Page("Select Letter").Sync
Set WshShell = CreateObject("WScript.Shell")
Browser("Browser").WinObject("AVPageView").highlight
WshShell.SendKeys "+^s"
Browser("Browser").Dialog("Save a Copy").WinTreeView("WinTreeView").Select "Favorites;Desktop"
Browser("Browser").Dialog("Save a Copy").WinButton("Save").Click
Browser("Browser").CloseAllTabs
Thanks in Advance
Sush
Based on your comment, I would try something like this..
NOW is the keyword, which would give you the current date and time. I simply replaced the "/", Spaces & ":" to genrate a file name. Just record saving the file again, this time instead of browsing the file, just type the full path. Ex: C:\A_Preffered_Folder\PDF\132017_35655_PM.PDF But make sure that the folder exists first. Once you have the code add the above code after you press ctrl s and replace the hardcoded value with the variable where you the file name.